Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setGlobalLevel(level: any) {
Object.values(logger.getLoggers()).forEach((lg) => {
lg.setLevel(level)
})
}
export function setAll(lvl: loglevel.LogLevelDesc): void {
Object.keys(loglevel.getLoggers()).map(key => {
const lg = loglevel.getLogger(key);
lg.setLevel(lvl as loglevel.LogLevelDesc);
});
}
loglevel.setAll = (lvl) => {
Object.keys(loglevel.getLoggers()).map(key => {
const lg = loglevel.getLogger(key)
lg.setLevel(lvl)
})
}