@zodash/logger
Advanced tools
Comparing version 0.2.20 to 0.2.21
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.2.21](https://github.com/zcorky/zodash/compare/@zodash/logger@0.2.20...@zodash/logger@0.2.21) (2021-09-17) | ||
### Bug Fixes | ||
* **logger:** fix error object JSON.stringify is {} if setLogDir will use middleware to write file ([09d5e98](https://github.com/zcorky/zodash/commit/09d5e98143004af5a2968e32d776e0e2e1ec0dbd)) | ||
## [0.2.20](https://github.com/zcorky/zodash/compare/@zodash/logger@0.2.19...@zodash/logger@0.2.20) (2021-09-09) | ||
@@ -8,0 +19,0 @@ |
@@ -207,2 +207,18 @@ "use strict"; | ||
.map((item) => { | ||
if (item instanceof Error) { | ||
// such | ||
// backend: code | status | ||
// axios: request | response | ||
const others = Object.keys(item).reduce((all, key) => { | ||
all[key] = item[key]; | ||
return all; | ||
}, {}); | ||
return { | ||
type: 'error', | ||
name: item.name, | ||
message: item.message, | ||
stack: item.stack, | ||
...others, | ||
}; | ||
} | ||
if (typeof item === 'object') { | ||
@@ -209,0 +225,0 @@ return JSON.stringify(item, null, 2); |
{ | ||
"name": "@zodash/logger", | ||
"version": "0.2.20", | ||
"version": "0.2.21", | ||
"description": "simple logger model", | ||
@@ -71,3 +71,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "88d212b581b34dcdec21d9eb768d302755392907" | ||
"gitHead": "cefa88ac56321cbbaa8a5e64384c1e60e48f06cc" | ||
} |
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
23670
343