egg-logger
Advanced tools
Comparing version 2.7.1 to 2.8.0
2.8.0 / 2022-03-22 | ||
================== | ||
**features** | ||
* [[`6f7dcbb`](http://github.com/eggjs/egg-logger/commit/6f7dcbb1ec92b0242c5adc43a41681c3848d4c62)] - feat: Only output logs in JSON file format is supported (#77) (duqingyu <<1065161421@qq.com>>) | ||
2.7.1 / 2021-12-30 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -25,2 +25,3 @@ 'use strict'; | ||
* - {Boolean} [outputJSON = false] - send JSON log or not | ||
* - {Boolean} [outputJSONOnly = false] - only send JSON log | ||
* - {Boolean} [buffer] - use {@link FileBufferTransport} or not | ||
@@ -41,12 +42,14 @@ * - {String} [eol] - end of line char | ||
const fileTransport = new EggFileTransport({ | ||
file: this.options.file, | ||
level: this.options.level || 'INFO', | ||
encoding: this.options.encoding, | ||
formatter: this.options.formatter, | ||
contextFormatter: this.options.contextFormatter, | ||
flushInterval: this.options.flushInterval, | ||
eol: this.options.eol, | ||
}); | ||
this.set('file', fileTransport); | ||
if (!this.options.outputJSONOnly) { | ||
const fileTransport = new EggFileTransport({ | ||
file: this.options.file, | ||
level: this.options.level || 'INFO', | ||
encoding: this.options.encoding, | ||
formatter: this.options.formatter, | ||
contextFormatter: this.options.contextFormatter, | ||
flushInterval: this.options.flushInterval, | ||
eol: this.options.eol, | ||
}); | ||
this.set('file', fileTransport); | ||
} | ||
@@ -106,2 +109,3 @@ if (this.options.jsonFile) { | ||
outputJSON: false, | ||
outputJSONOnly: false, | ||
jsonFile: '', | ||
@@ -108,0 +112,0 @@ }; |
@@ -19,2 +19,3 @@ 'use strict'; | ||
outputJSON: false, | ||
outputJSONOnly: false, | ||
buffer: true, | ||
@@ -45,2 +46,3 @@ appLogName: '', | ||
* - {Boolean} [outputJSON = false] - send JSON log or not | ||
* - {Boolean} [outputJSONOnly = false] - only send JSON log | ||
* - {Boolean} [buffer = true] - use {@link FileBufferTransport} or not | ||
@@ -47,0 +49,0 @@ * - {String} appLogName - egg app file logger name |
{ | ||
"name": "egg-logger", | ||
"version": "2.7.1", | ||
"version": "2.8.0", | ||
"description": "egg logger", | ||
@@ -26,2 +26,3 @@ "main": "index.js", | ||
"eslint-config-egg": "^7.1.0", | ||
"git-contributor": "^1.0.10", | ||
"ko-sleep": "^1.0.3", | ||
@@ -43,4 +44,5 @@ "koa": "^1.6.2", | ||
"homepage": "https://github.com/eggjs/egg-logger", | ||
"author": "fengmk2 <fengmk2@gmail.com> (https://fengmk2.com)", | ||
"author": "fengmk2 <fengmk2@gmail.com> (https://github.com/fengmk2)", | ||
"scripts": { | ||
"contributor": "git-contributor", | ||
"autod": "autod", | ||
@@ -47,0 +49,0 @@ "lint": "eslint .", |
@@ -125,1 +125,13 @@ # egg-logger | ||
[MIT](LICENSE) | ||
<!-- GITCONTRIBUTOR_START --> | ||
## Contributors | ||
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/360661?v=4" width="100px;"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|[<img src="https://avatars.githubusercontent.com/u/227713?v=4" width="100px;"/><br/><sub><b>atian25</b></sub>](https://github.com/atian25)<br/>|[<img src="https://avatars.githubusercontent.com/u/5856440?v=4" width="100px;"/><br/><sub><b>whxaxes</b></sub>](https://github.com/whxaxes)<br/>|[<img src="https://avatars.githubusercontent.com/u/3367820?v=4" width="100px;"/><br/><sub><b>Jeff-Tian</b></sub>](https://github.com/Jeff-Tian)<br/>| | ||
| :---: | :---: | :---: | :---: | :---: | :---: | | ||
|[<img src="https://avatars.githubusercontent.com/u/2160731?v=4" width="100px;"/><br/><sub><b>mansonchor</b></sub>](https://github.com/mansonchor)<br/>|[<img src="https://avatars.githubusercontent.com/u/19274678?v=4" width="100px;"/><br/><sub><b>andy-ms</b></sub>](https://github.com/andy-ms)<br/>|[<img src="https://avatars.githubusercontent.com/u/5886475?v=4" width="100px;"/><br/><sub><b>DavidCai1993</b></sub>](https://github.com/DavidCai1993)<br/>|[<img src="https://avatars.githubusercontent.com/u/1474688?v=4" width="100px;"/><br/><sub><b>luckydrq</b></sub>](https://github.com/luckydrq)<br/>|[<img src="https://avatars.githubusercontent.com/u/2842176?v=4" width="100px;"/><br/><sub><b>XadillaX</b></sub>](https://github.com/XadillaX)<br/>|[<img src="https://avatars.githubusercontent.com/u/8201516?v=4" width="100px;"/><br/><sub><b>linrf</b></sub>](https://github.com/linrf)<br/>| | ||
[<img src="https://avatars.githubusercontent.com/u/30541930?v=4" width="100px;"/><br/><sub><b>duqingyu</b></sub>](https://github.com/duqingyu)<br/>|[<img src="https://avatars.githubusercontent.com/u/7779883?v=4" width="100px;"/><br/><sub><b>lix059</b></sub>](https://github.com/lix059)<br/>|[<img src="https://avatars.githubusercontent.com/u/2675419?v=4" width="100px;"/><br/><sub><b>congyuandong</b></sub>](https://github.com/congyuandong)<br/>|[<img src="https://avatars.githubusercontent.com/u/1763067?v=4" width="100px;"/><br/><sub><b>waitingsong</b></sub>](https://github.com/waitingsong)<br/> | ||
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Mar 22 2022 23:31:56 GMT+0800`. | ||
<!-- GITCONTRIBUTOR_END --> |
@@ -125,1 +125,13 @@ # egg-logger | ||
[MIT](LICENSE) | ||
<!-- GITCONTRIBUTOR_START --> | ||
## Contributors | ||
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/360661?v=4" width="100px;"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|[<img src="https://avatars.githubusercontent.com/u/227713?v=4" width="100px;"/><br/><sub><b>atian25</b></sub>](https://github.com/atian25)<br/>|[<img src="https://avatars.githubusercontent.com/u/5856440?v=4" width="100px;"/><br/><sub><b>whxaxes</b></sub>](https://github.com/whxaxes)<br/>|[<img src="https://avatars.githubusercontent.com/u/3367820?v=4" width="100px;"/><br/><sub><b>Jeff-Tian</b></sub>](https://github.com/Jeff-Tian)<br/>| | ||
| :---: | :---: | :---: | :---: | :---: | :---: | | ||
|[<img src="https://avatars.githubusercontent.com/u/2160731?v=4" width="100px;"/><br/><sub><b>mansonchor</b></sub>](https://github.com/mansonchor)<br/>|[<img src="https://avatars.githubusercontent.com/u/19274678?v=4" width="100px;"/><br/><sub><b>andy-ms</b></sub>](https://github.com/andy-ms)<br/>|[<img src="https://avatars.githubusercontent.com/u/5886475?v=4" width="100px;"/><br/><sub><b>DavidCai1993</b></sub>](https://github.com/DavidCai1993)<br/>|[<img src="https://avatars.githubusercontent.com/u/1474688?v=4" width="100px;"/><br/><sub><b>luckydrq</b></sub>](https://github.com/luckydrq)<br/>|[<img src="https://avatars.githubusercontent.com/u/2842176?v=4" width="100px;"/><br/><sub><b>XadillaX</b></sub>](https://github.com/XadillaX)<br/>|[<img src="https://avatars.githubusercontent.com/u/8201516?v=4" width="100px;"/><br/><sub><b>linrf</b></sub>](https://github.com/linrf)<br/>| | ||
[<img src="https://avatars.githubusercontent.com/u/30541930?v=4" width="100px;"/><br/><sub><b>duqingyu</b></sub>](https://github.com/duqingyu)<br/>|[<img src="https://avatars.githubusercontent.com/u/7779883?v=4" width="100px;"/><br/><sub><b>lix059</b></sub>](https://github.com/lix059)<br/>|[<img src="https://avatars.githubusercontent.com/u/2675419?v=4" width="100px;"/><br/><sub><b>congyuandong</b></sub>](https://github.com/congyuandong)<br/>|[<img src="https://avatars.githubusercontent.com/u/1763067?v=4" width="100px;"/><br/><sub><b>waitingsong</b></sub>](https://github.com/waitingsong)<br/> | ||
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Mar 22 2022 23:31:56 GMT+0800`. | ||
<!-- GITCONTRIBUTOR_END --> |
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
58804
1254
136
20