I am trying to create a logfile where I want to write everything info/error/warn etc.
Below is my code where I can see the logs on console but the script is not writing into a file:
var log4js = require('log4js');
log4js.configure({
appenders: {
cleanupLogs: {
type: 'file',
filename: 'QuoteCleanup.log'
},
console: {
type: 'console'
}
},
categories: {
default: {
appenders: ['console'],
level: 'trace'
}
}
});
var log = log4js.getLogger();