1

I am using log4js on Node.js

Is there a way to configure log level of each logger & appender pair ?

For example:

I have the default console appender and a dateFile appender. I want dateFile appender to capture all messages according to globally configured category levels.

Now I'd like console appender to completely ignore messages of certain log categories because I need just a high level view on console. Printing all the log messages on console is just too much noise to follow.

Is that even possible? I could not find any relevant API for that. I could only set levels for individual loggers using for example myLogger.setLevel("ERROR"), but that affects all the appenders.

TMG
  • 2,620
  • 1
  • 17
  • 40

0 Answers0