This logger decorates logging messages made to it with additional data in JSON format, and if instantiated will monitor long-running requests. To use it, require it, and provide it with the its context's filename if you would like that added to the logging object.
JSON is minified when NODE_ENV === 'production'
To run, clone this repo, npm i
and npm start
.
See examples on localhost:3010
Without instantiation (eg const logger = require('./logger')
, these console methods are supported, as they would normally be used: