Skip to content

Commit b004622

Browse files
author
Matt Berther
committed
setting options.timestamp to true if not passed. Keep compatibility with winston-file-transport
1 parent 2e2e3e2 commit b004622

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ var DailyRotateFile = module.exports = function (options) {
7272
this.label = options.label || null;
7373
this.prettyPrint = options.prettyPrint || false;
7474
this.showLevel = options.showLevel === undefined ? true : options.showLevel;
75-
this.timestamp = options.timestamp || null;
75+
this.timestamp = options.timestamp || true;
7676
this.datePattern = options.datePattern ? options.datePattern : '.yyyy-MM-dd';
7777
this.depth = options.depth || null;
7878
this.eol = options.eol || os.EOL;

test/simple.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ describe('winston/transports/daily-rotate-file', function () {
364364
filename: path.join(rotationLogPath, 'test-rotation.log'),
365365
datePattern: dailyRotationPattern.pattern,
366366
maxFiles: 2,
367-
maxsize: 50
367+
maxsize: 100
368368
});
369369

370370
done();

0 commit comments

Comments
 (0)