Skip to content
Grant Carthew edited this page Jun 7, 2018 · 9 revisions

Q) How do I pretty print the log lines to the console?

A) You will need to supply a custom write function. See the simple example to get you started.


Q) How can I remove sensitive information from the JSON output?

A) Change the stringifyFunction to a custom function or something like fast-redact.


Q) How do I query JSON log files?

A) Use the jq command line tool.

Q) How do I disable all logging output?

A) If you wish to make your logger silent for some reason, you can customize the log levels. By creating a { silent: Infinity } logging level you could change the operating level to silent. This would prevent all log output. A corresponding log.silent() function would be created, just don't use it.

Clone this wiki locally