From 80a3354866f3b65d9abb66a7420b3a66bb2ef858 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 7 Dec 2022 00:46:16 -0500 Subject: [PATCH] *ensure loglevel is configurable --- src/config.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/config.ts b/src/config.ts index 51a9cbe..fc5a6f1 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,12 +1,9 @@ -//const require = createRequire(import.meta.url); -//import { createRequire } from "module"; - // @ts-ignore import Config from "@lumeweb/cfg"; import * as os from "os"; import * as fs from "fs"; import path from "path"; -import { errorExit } from "./lib/error.js"; +import log from "loglevel"; const config = new Config("lumeweb-relay"); @@ -55,4 +52,6 @@ config.load({ argv: true, }); +log.setDefaultLevel(config.get("loglevel")); + export default config;