hapijs / good

hapi process monitoring
Other
525 stars 160 forks source link

How to include certain properties in the log file? #501

Closed sulhome closed 8 years ago

sulhome commented 8 years ago

Let's say I want to log the response. I am only interested in response time, status code and Url. How can I log only these information?

Thank you

arb commented 8 years ago

You'd want to set your filters to only report "ops" events and use something like "white-out" to strip out the keys you don't want. Check out https://github.com/hapijs/good/blob/master/examples/censoring-with-white-out.md for an example of using white-out to remove keys from reports.

You could also write your own transform stream and handle the filtering and payload mutation yourself and the pipe it to stdout or to a file or where ever you want to log data to.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.