Socket
Socket
Sign inDemoInstall

winston-daily-rotate-file

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-daily-rotate-file - npm Package Compare versions

Comparing version 3.8.0 to 3.9.0

4

daily-rotate-file.js

@@ -94,2 +94,6 @@ 'use strict';

this.logStream.on('new', function (newFile) {
self.emit('new', newFile);
});
this.logStream.on('rotate', function (oldFile, newFile) {

@@ -96,0 +100,0 @@ self.emit('rotate', oldFile, newFile);

2

package.json
{
"name": "winston-daily-rotate-file",
"version": "3.8.0",
"version": "3.9.0",
"description": "A transport for winston which logs to a rotating file each day.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -54,3 +54,3 @@ # winston-daily-rotate-file

You can listen for the *rotate* custom event. The rotate event will pass two parameters to the callback (*oldFilename*, *newFilename*). You can also listen for the *archive* custom event. The archive event will pass one parameter to the callback (*zipFilename*).
This transport emits three custom events: *new*, *rotate*, and *archive*. You can listen for the *new* custom event, which is fired when a new log file is created. The new event will pass one parameter to the callback (*newFilename*). You can listen for the *rotate* custom event, which is fired when the log file is rotated. The rotate event will pass two parameters to the callback (*oldFilename*, *newFilename*). You can also listen for the *archive* custom event, which is fired when the log file is archived. The archive event will pass one parameter to the callback (*zipFilename*).

@@ -57,0 +57,0 @@ ## LICENSE

@@ -153,2 +153,12 @@ /* eslint-disable max-nested-callbacks,no-unused-expressions,handle-callback-err */

it('should raise the new event for a new log file', function (done) {
this.transport.on('new', function (newFile) {
expect(newFile).to.equal(filename);
done();
});
sendLogItem(this.transport, 'info', 'this message should write to the file');
this.transport.close();
});
describe('when setting zippedArchive', function () {

@@ -238,3 +248,2 @@ it('should archive the log after rotating', function (done) {

});
this.transport.close();
});

@@ -241,0 +250,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc