@pager/logger
Advanced tools
Comparing version 3.0.1 to 3.1.0
'use strict'; | ||
const Pino = require('pino'); | ||
const Noir = require('pino-noir'); | ||
@@ -9,15 +8,23 @@ const internals = { | ||
level: 'info', | ||
messageKey: 'data' | ||
}, | ||
noirDefaults: [ | ||
'password', | ||
'token', | ||
'authorization', | ||
'Authorization', | ||
'encryptedPassword', | ||
'bearerToken', | ||
'client_id', | ||
'client_secret', | ||
'refreshcode' | ||
] | ||
messageKey: 'data', | ||
redact: [ | ||
'body.data.key', | ||
'body.data.secret', | ||
'data.body.token', | ||
'encryptedPassword', | ||
'event.token', | ||
'headers.authorization', | ||
'headers.Authorization', | ||
'message.payload.token', | ||
'message.token', | ||
'password', | ||
'req.headers.authorization', | ||
'req.headers.Authorization', | ||
'requestPayload.authCode', | ||
'requestPayload.password', | ||
'requestPayload.user.password', | ||
'responsePayload.token', | ||
'token' | ||
] | ||
} | ||
}; | ||
@@ -27,7 +34,5 @@ | ||
const noirConfig = (pinoOptions.noir || []).concat(internals.noirDefaults); | ||
pinoOptions.redact = (pinoOptions.redact || []).concat(internals.defaults.redact); | ||
const config = { | ||
...internals.defaults, | ||
...{ serializers: Noir(noirConfig) }, | ||
...pinoOptions | ||
@@ -34,0 +39,0 @@ }; |
{ | ||
"name": "@pager/logger", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Logging library", | ||
@@ -22,4 +22,3 @@ "keywords": [ | ||
"hapi-pino": "5.x.x", | ||
"hoek": "6.x.x", | ||
"pino-noir": "2.x.x" | ||
"hoek": "6.x.x" | ||
}, | ||
@@ -26,0 +25,0 @@ "devDependencies": { |
@@ -11,3 +11,6 @@ # logger | ||
### Redacting | ||
This library has been set up with an array of standard redactions based on current usage. Each app should explicitly append and detail all potential leaks. There are no defaults because there are associated performance issues with wildcards, particularly intermediate wildcards. Please do your part in log security to ensure no PHI or secrets are leaked into the logs. | ||
### Configuration | ||
@@ -14,0 +17,0 @@ |
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
5822
2
72
88
0
- Removedpino-noir@2.x.x
- Removedpino-noir@2.2.1(transitive)