Separate the logging #27

Open
lecris wants to merge 6 commits from lecris/matrix-puppeteer-line:logger into testing
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 0a6609e6c9 - Show all commits

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:'});