-
Notifications
You must be signed in to change notification settings - Fork 759
How to set the default log level? #436
Copy link
Copy link
Closed
Description
I have some log4js config like this:
var config = { appenders:[ { type:"console" }, { type: "file", filename: "file.log", maxLogSize: 20480, backups: 10 } ], replaceConsole: true, levels: {} }
and used as :
var logger = log4js.getLogger();
It works fine with logs output to console and file.log. The log content from console.log() is replaced with log4js style with log level 'INFO' as I learned. But when I call logger.setLevel('ERROR'); immedidately after calling getLogger(), the logs from console.log() are still present, both in the console and file.log. Shouldn't they disapprear after I restart the application?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels