Defaults not undefined

This commit is contained in:
Cristian Le 2021-07-30 17:02:42 +09:00
parent 4e639ee2ff
commit 0a6609e6c9
1 changed files with 3 additions and 3 deletions

View File

@ -47,9 +47,9 @@ MessagesPuppeteer.jiggleDelay = config.jiggle_delay || MessagesPuppeteer.jiggleD
let clog = config.logger
let clogpup = clog ? clog.puppeteer : undefined
logger.setLevel(clog ? clog.default_level || 3 : 3)
logger.getLogger("Puppeteer").setLevel(clogpup ? clogpup.level : logger.getLevel())
logger.getLogger("Puppeteer_details").setLevel(clogpup ? clogpup.details : 3)
logger.getLogger("Puppeteer_spammer").setLevel(clogpup ? clogpup.spammer : 3)
logger.getLogger("Puppeteer").setLevel(clogpup ? clogpup.level || logger.getLevel() : logger.getLevel())
logger.getLogger("Puppeteer_details").setLevel(clogpup ? clogpup.details || 3 : 3)
logger.getLogger("Puppeteer_spammer").setLevel(clogpup ? clogpup.spammer || 3 : 3)
// Register and specify the logger format. Others will inherit
loggerprefix.reg(logger)
loggerprefix.apply(logger, {template: '[%n] %l:'});