egg-logger
Advanced tools
Comparing version 3.2.1 to 3.3.0
@@ -43,2 +43,3 @@ import { AsyncLocalStorage } from 'async_hooks'; | ||
buffer?: boolean; | ||
dateISOFormat?: boolean; | ||
eol?: string; | ||
@@ -152,2 +153,3 @@ concentrateError?: 'duplicate' | 'redirect' | 'ignore'; | ||
outputJSON?: boolean; | ||
dateISOFormat?: boolean, | ||
buffer?: boolean; | ||
@@ -198,2 +200,3 @@ appLogName: string; | ||
json?: boolean; | ||
dateISOFormat?: boolean; | ||
encoding?: string; | ||
@@ -200,0 +203,0 @@ eol?: string; |
@@ -27,2 +27,3 @@ const path = require('path'); | ||
* - {Boolean} [buffer] - use {@link FileBufferTransport} or not | ||
* - {Boolean} [dateISOFormat = false] - format date with ISO format | ||
* - {String} [eol] - end of line char | ||
@@ -54,2 +55,3 @@ * - {String} [concentrateError] - whether write error logger to common-error.log, `duplicate` / `redirect` / `ignore` | ||
localStorage: this.options.localStorage, | ||
dateISOFormat: this.options.dateISOFormat, | ||
}); | ||
@@ -68,2 +70,3 @@ this.set('file', fileTransport); | ||
localStorage: this.options.localStorage, | ||
dateISOFormat: this.options.dateISOFormat, | ||
}); | ||
@@ -80,2 +83,3 @@ this.set('jsonFile', jsonFileTransport); | ||
localStorage: this.options.localStorage, | ||
dateISOFormat: this.options.dateISOFormat, | ||
}); | ||
@@ -118,2 +122,3 @@ this.set('console', consoleTransport); | ||
outputJSONOnly: false, | ||
dateISOFormat: false, | ||
jsonFile: '', | ||
@@ -120,0 +125,0 @@ }; |
@@ -23,2 +23,3 @@ 'use strict'; | ||
* - {Boolean} [json = false] - log format is json or not | ||
* - {Boolean} [dateISOFormat = false] - format date with ISO format | ||
* - {String} [encoding = utf8] - log encodeing, see {@link https://github.com/ashtuchkin/iconv-lite#supported-encodings} | ||
@@ -25,0 +26,0 @@ * - {String} [eol = os.EOL] - end of line |
@@ -111,2 +111,3 @@ 'use strict'; | ||
* - {Boolean} json | ||
* - {Boolean} dateISOFormat | ||
* - {Function} [formatter] | ||
@@ -146,3 +147,3 @@ * - {Function} [contextFormatter] | ||
meta.level = level; | ||
meta.date = utility.logDate(','); | ||
meta.date = options.dateISOFormat ? new Date().toISOString() : utility.logDate(','); | ||
meta.pid = process.pid; | ||
@@ -149,0 +150,0 @@ meta.hostname = hostname; |
{ | ||
"name": "egg-logger", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"description": "egg logger", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
53962
1343