我正在使用Winston向NodeJS应用程序的日志文件中添加一些日志记录-日志记录本身正在工作,除非我看不到应自动添加的时间戳。有人可以看到我在做什么错吗?
this.winston = winston.createLogger({
transports: [
new (winston.transports.Console)({json: false, timestamp: true}),
new winston.transports.File({
filename: `${logPath}/${moment().format('YYYY-MM-DD')}.log`,
json: false,
timestamp: true
})
]
});