egg-logger
Advanced tools
Comparing version 1.1.1 to 1.2.0
1.2.0 / 2016-08-11 | ||
================== | ||
* feat: remove fileTransport from consoleLogger (#6) | ||
1.1.1 / 2016-08-10 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -5,3 +5,2 @@ 'use strict'; | ||
const ConsoleTransport = require('../transports/console'); | ||
const FileTransport = require('../transports/file'); | ||
const utils = require('../utils'); | ||
@@ -17,4 +16,2 @@ | ||
* @param {Object} options | ||
* - {String} [errorFile] - error file | ||
* if specify this file, logger will redirect error log to the file. | ||
* - {String} [encoding] - log string encoding, default is 'utf8' | ||
@@ -29,12 +26,2 @@ */ | ||
})); | ||
if (this.options.errorFile) { | ||
const fileTransport = new FileTransport({ | ||
file: this.options.errorFile, | ||
level: 'ERROR', // 只输出 error 级别的到文件 | ||
encoding: this.options.encoding, | ||
formatter: utils.defaultFormatter, | ||
}); | ||
this.set('file', fileTransport); | ||
} | ||
} | ||
@@ -44,3 +31,2 @@ | ||
return { | ||
errorFile: '', | ||
encoding: 'utf8', | ||
@@ -47,0 +33,0 @@ level: process.env.NODE_ENV === 'production' ? 'INFO' : 'WARN', |
{ | ||
"name": "egg-logger", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "egg logger", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31133
892