Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable console printing in Log4js

I just enabled logging using Log4js in my Node.js application. I have used the config option from https://github.com/nomiddlename/log4js-node and it's working fine.

It writes the logs in the log file, as well as in the console. I do not want this to be printed in the console. Not able to figure out how to configure this. awfully sorry to ask this silly question.

like image 698
user644745 Avatar asked Mar 04 '12 06:03

user644745


1 Answers

Use log4js.clearAppenders() before adding the appenders you want to use.

like image 78
Julian Goacher Avatar answered Oct 11 '22 05:10

Julian Goacher