@coozzy/logger
Advanced tools
Comparing version 1.0.1 to 1.1.0
const winston = require('winston'); | ||
const requestId = require('@coozzy/request-id'); | ||
@@ -6,3 +7,3 @@ const logger = winston.createLogger({ | ||
format: winston.format.combine( | ||
winston.format((info) => { | ||
winston.format(info => { | ||
if (info.level === 'warn') { | ||
@@ -17,2 +18,7 @@ info.severity = 'warning'; | ||
})(), | ||
winston.format(info => { | ||
info.requestId = requestId.getRequestId() || undefined; | ||
return info; | ||
})(), | ||
winston.format.json() | ||
@@ -19,0 +25,0 @@ ), |
{ | ||
"name": "@coozzy/logger", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Logging library based on winston", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,7 @@ # coozzy-logger | ||
## Request ID | ||
It uses the `@coozzy/request-id` dependency to add the requestId on each log entry. | ||
## Dependencies | ||
- [winston](https://www.npmjs.com/package/winston) | ||
- [@coozzy/request-id](https://www.npmjs.com/package/@coozzy/request-id) |
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
25
19
1598
3