-
Notifications
You must be signed in to change notification settings - Fork 764
Closed
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels