generated from DEFRA/ffc-template-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SFI-1032:Replace good logging with hapi-pino (#27)
- Loading branch information
1 parent
3cd7048
commit 22a879b
Showing
3 changed files
with
467 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,10 @@ | ||
const config = require('../config') | ||
|
||
module.exports = { | ||
plugin: require('@hapi/good'), | ||
plugin: require('hapi-pino'), | ||
options: { | ||
ops: { | ||
interval: 1000 | ||
}, | ||
reporters: { | ||
console: [ | ||
{ | ||
module: '@hapi/good-squeeze', | ||
name: 'Squeeze', | ||
args: [ | ||
{ | ||
log: '*', | ||
error: '*', | ||
response: '*', | ||
request: '*' | ||
} | ||
] | ||
}, | ||
{ | ||
module: '@hapi/good-console' | ||
}, | ||
'stdout' | ||
] | ||
} | ||
logPayload: true, | ||
prettyPrint: config.isDev, | ||
level: config.isDev ? 'debug' : 'warn' | ||
} | ||
} |
Oops, something went wrong.