egg-logger
Advanced tools
Comparing version 2.6.1 to 2.6.2
2.6.2 / 2021-08-02 | ||
================== | ||
**fixes** | ||
* [[`62d724f`](http://github.com/eggjs/egg-logger/commit/62d724fc2b4b2a22c2d554dbfc4c882b766ed630)] - fix: remove defineProperty to improve performance (#72) (Yiyu He <<dead_horse@qq.com>>) | ||
2.6.1 / 2021-04-07 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -47,7 +47,4 @@ 'use strict'; | ||
paddingMessage: this.paddingMessage, | ||
ctx: this.ctx, | ||
}; | ||
Object.defineProperty(meta, 'ctx', { | ||
enumerable: false, | ||
value: this.ctx, | ||
}); | ||
this._logger.log(LEVEL, arguments, meta); | ||
@@ -54,0 +51,0 @@ }; |
@@ -101,3 +101,9 @@ 'use strict'; | ||
meta.message = message; | ||
output = options.json === true ? JSON.stringify(meta) : formatter(meta); | ||
if (options.json === true) { | ||
const outputMeta = { ...meta }; | ||
outputMeta.ctx = undefined; | ||
output = JSON.stringify(outputMeta); | ||
} else { | ||
output = formatter(meta); | ||
} | ||
} else { | ||
@@ -104,0 +110,0 @@ output = message; |
{ | ||
"name": "egg-logger", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "egg logger", | ||
@@ -23,2 +23,3 @@ "main": "index.js", | ||
"egg-bin": "^4.9.0", | ||
"egg-ci": "^1.18.0", | ||
"eslint": "^5.11.1", | ||
@@ -61,5 +62,6 @@ "eslint-config-egg": "^7.1.0", | ||
"ci": { | ||
"version": "8, 10, 12, 14" | ||
"version": "8, 10, 12, 14", | ||
"type": "github" | ||
}, | ||
"license": "MIT" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
52185
1238
0
19