Added logger-setup-module
parent
8ee189f52b
commit
cc8b106157
@ -0,0 +1,11 @@
|
|||||||
|
const log4js = require("log4js");
|
||||||
|
|
||||||
|
|
||||||
|
function setup(category = "unknown"){
|
||||||
|
const logger = log4js.getLogger(category);
|
||||||
|
logger.level = process.env.LOGLEVEL ?? "INFO";
|
||||||
|
return logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Specify exports
|
||||||
|
module.exports = setup;
|
Loading…
Reference in New Issue