Socket
Socket
Sign inDemoInstall

egg-logger

Package Overview
Dependencies
Maintainers
5
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-logger - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

README.zh-CN.md

6

History.md
1.6.1 / 2017-12-27
==================
**fixes**
* [[`f0bf7d9`](http://github.com/eggjs/egg-logger/commit/f0bf7d97e269da3ff29f2a6f811f1b48558fbcab)] - fix(transport): should reload write stream when stream get error (#21) (Haoliang Gao <<sakura9515@gmail.com>>)
1.6.0 / 2017-04-28

@@ -3,0 +9,0 @@ ==================

15

lib/transports/file.js

@@ -99,3 +99,11 @@ 'use strict';

const stream = fs.createWriteStream(this.options.file, { flags: 'a' });
const onError = err => {
console.error('%s ERROR %s [egg-logger] [%s] %s',
utility.logDate(','), process.pid, this.options.file, err.stack);
this.reload();
console.warn('%s WARN %s [egg-logger] [%s] reloaded', utility.logDate(','), process.pid, this.options.file);
};
stream.on('error', onError);
stream._onError = onError;
return stream;

@@ -111,3 +119,3 @@ }

this._stream.end();
this._stream.removeListener('error', onError);
this._stream.removeListener('error', this._stream._onError);
this._stream = null;

@@ -120,6 +128,1 @@ }

module.exports = FileTransport;
function onError(err) {
console.error('%s ERROR %s [chair-logger:buffer_write_stream] %s: %s\n%s',
utility.logDate(','), process.pid, err.name, err.message, err.stack);
}

6

package.json
{
"name": "egg-logger",
"version": "1.6.0",
"version": "1.6.1",
"description": "egg logger",

@@ -23,5 +23,7 @@ "main": "index.js",

"eslint-config-egg": "^3.2.0",
"heapdump": "^0.3.9",
"ko-sleep": "^1.0.2",
"koa": "^1.3.0",
"mm": "^2.1.0",
"mz-modules": "^2.0.0",
"rimraf": "^2.6.1",

@@ -52,3 +54,3 @@ "should": "^11.2.1",

"ci": {
"version": "4, 6, 7",
"version": "4, 6, 8, 9",
"license": true

@@ -55,0 +57,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