我目前正在使用Winston记录器我有一个Winston记录器功能有助于创建日志文件,如果当前文件不存在用于记录?
winston.loggers.add("order_log", {
transports: [
new(winston.transports.Console)({
//name: "order_check_console",
level: 'debug',
//json: true,
colorize: true
}),
new(winston.transports.File)({
//name: "order_check_file",
filename: system_path.order_trans_path,
level: 'debug',
handleExceptions: true,
humanReadableUnhandledException: true
})
]
});