@deboxsoft/module-core
Advanced tools
Comparing version 2.5.42 to 2.5.43
@@ -251,3 +251,8 @@ var __defProp = Object.defineProperty; | ||
var LOGGER_KEY = Symbol("logger"); | ||
var getLogger = () => Container.get(LOGGER_KEY); | ||
var getLogger = () => { | ||
if (Container.has(LOGGER_KEY)) { | ||
return Container.get(LOGGER_KEY); | ||
} | ||
return createLoggerConsole(); | ||
}; | ||
var createLoggerConsole = (refresh = false) => { | ||
@@ -258,8 +263,22 @@ if (!refresh && Container.has(LOGGER_KEY)) { | ||
const logger = { | ||
fatal: (...args) => console.error("fatal >>", ...args), | ||
error: (...args) => console.error(...args), | ||
info: (...args) => console.log(...args), | ||
trace: (...args) => console.debug("trace >>", ...args), | ||
debug: (...args) => console.debug(...args), | ||
warn: (...args) => console.warn(...args) | ||
fatal: (...args) => { | ||
console.error("fatal >>", ...args); | ||
}, | ||
error: (...args) => { | ||
console.error(...args); | ||
}, | ||
info: (...args) => { | ||
console.log(...args); | ||
}, | ||
trace: (...args) => { | ||
console.debug("trace >>", ...args); | ||
}, | ||
debug: (...args) => { | ||
if (process.env.NODE_ENV !== "production") { | ||
console.debug(...args); | ||
} | ||
}, | ||
warn: (...args) => { | ||
console.warn(...args); | ||
} | ||
}; | ||
@@ -266,0 +285,0 @@ Container.set(LOGGER_KEY, logger); |
{ | ||
"name": "@deboxsoft/module-core", | ||
"version": "2.5.42", | ||
"version": "2.5.43", | ||
"license": "SEE LICENSE IN LICENSE", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65740
1952
2