1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Allow specifying the log level of a log target

This commit is contained in:
Laurent Cozic
2019-05-11 17:53:56 +01:00
parent 0d036d8183
commit e96bc9c48a
2 changed files with 10 additions and 2 deletions

View File

@ -534,7 +534,7 @@ class BaseApplication {
initArgs = Object.assign(initArgs, extraFlags);
this.logger_.addTarget('file', { path: profileDir + '/log.txt' });
// if (Setting.value('env') === 'dev') this.logger_.addTarget('console');
if (Setting.value('env') === 'dev') this.logger_.addTarget('console', { level: Logger.LEVEL_WARN });
this.logger_.setLevel(initArgs.logLevel);
reg.setLogger(this.logger_);