winston-daily-rotate-file 前置选项不起作用

winston-daily-rotate-file prepend option not working

我的 winston 设置如下

// Config import.
var config = require('../config');

// Library imports.
var winston = require('winston');

var logger = new(winston.Logger)({
    transports: [
        new(winston.transports.Console)({
            level: 'debug',
            colorize: true,
            timestamp: true,
            json: true,
            showLevel: true
        }),
        new(require('winston-daily-rotate-file'))({
            prepend: true,
            level: 'debug',
            colorize: true,
            timestamp: true,
            filename: 'log.txt',
            maxSize: config.log.maxSize,
            json: true,
            prettyPrint: true 
        })
    ]
});

它正常记录到控制台 - 正如预期的那样。 它正常记录到文件 - 正如预期的那样。

但是,文件名将日期附加到文件名的末尾,而不是开头,就像 prepend 选项所建议的那样。

有没有人能对此提供任何见解?

解决了这个问题 - 我有点傻。

项目 github 页面上 master 中显示的版本与 npm install 发布的版本不同 - 通过 npm 提供的版本不一样目前不支持前置选项。

希望尽快发布 :)