*ensure loglevel is configurable
This commit is contained in:
parent
7bd0a72113
commit
80a3354866
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue