如何在winstonlogging器中创build一个文件

我目前使用温斯顿logging器我有一个有没有任何温斯顿logging器function,这有助于创build日志文件,如果当前文件不存在logging?

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 }) ] });