Skip to content

logwriter

jarnoux edited this page Nov 30, 2013 · 6 revisions

Description

The logwriter middleware adds a log object member to the response object. This object has four methods: debug, info, warning, error. They all have the same signature: function info(message). A method's message logging will be filtered/skipped if the "logLevel" configuration corresponds to a level that is strictly greater than the method's logging level. The ascending order is 'debug', 'info', 'warning', 'error'

Configuration

Example

"logwriter": { "logLevel": "debug" }

Members

  • logLevel. This setting is the filter under which you don't want the message to be printed in the log. Defaults to 'error'. Can be 'debug' or 'info' or 'warning' or 'error'.
  • out. This setting is the output stream you want to the logging to go to. Defaults to process.stdout. This is a runtime setting.

Clone this wiki locally