bunyanLog: Logs a message

Description Usage Arguments

Description

Log errors, warnings, debug and trace messages bunyan style, with JSON formatted machine readable logs, and a memory buffer for traceback. Supports one log file and memory log. For more than one log file, the JSON emitted Can be used with other logging packages.

Usage

1
  bunyanLog(msg, level, req, res, version)

Arguments

msg

optional. Error to report - R struct passed to toJSON

level

string or numeric, required. 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL' Level required to trigger log write.

req

optional. An http style request R struct

res

optional. An http style response R struct

version

optional. A user specified version R struct


joyent/Rbunyan documentation built on May 19, 2019, 9:43 p.m.