Skip to content

Instantly share code, notes, and snippets.

@adnan-i
Created December 29, 2017 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adnan-i/b9ababab968a701bc68e6ebbade6360b to your computer and use it in GitHub Desktop.
Save adnan-i/b9ababab968a701bc68e6ebbade6360b to your computer and use it in GitHub Desktop.
Excerpt from the logging configuration for a HapiJS project
/*
* All logs are streamed through the "white-out" middleware
* which is responsible for removing any instances of password
* properties from the logged objects
*/
{
myConsoleReporter: [{
module: 'good-squeeze',
name: 'Squeeze',
args: [{log: '*', response: '*', request: '*'}]
}, {
module: 'white-out',
args: [{
password: 'remove',
}]
}, {
module: 'good-console',
args: [{format: 'YYYY-MM-DD hh:mm:ss'}],
}, 'stdout'],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment