Hi all.
I want to do something like it: https://stackoverflow.com/a/26731285/1741027
But I dont know why it return log4js.loadAppender is not a function
I added in each js file this code:
const path = require('path')
const log4js = require('log4js')
const fileName = path.basename(__filename, path.extname(__filename))
log4js.loadAppender('file')
log4js.addAppender(log4js.appenders.file('logs/'+ fileName +'.log'), fileName)
const logger = log4js.getLogger(fileName)
Is there a way to get the same behavior?
Thanks.
Hi all.
I want to do something like it: https://stackoverflow.com/a/26731285/1741027
But I dont know why it return
log4js.loadAppender is not a functionI added in each js file this code:
const path = require('path')const log4js = require('log4js')const fileName = path.basename(__filename, path.extname(__filename))log4js.loadAppender('file')log4js.addAppender(log4js.appenders.file('logs/'+ fileName +'.log'), fileName)const logger = log4js.getLogger(fileName)Is there a way to get the same behavior?
Thanks.