Watchdog for your app. Provides API for logging and shutting down on certain condition.
Features:
- provides caller info (which function has called log method)
- colored console output
- logs uncaught exceptions (with
alert
level) - provides methods to shut down app on uncaught exception or exceeding memory limit
Notice: if argument (except error) is object, it will be JSON.stringify
ed, otherwise, toString
ed.
Logs arg
and error details (if any) with level alert
(highest level) to stderr
.
Logs arg
and error details (if any) with level error
to stderr
.
Logs arg
with level info
to stdout
.
Logs arg
with level debug
to stdout
.
Shuts down app on uncaught exception.
Shuts down app when it has consumed more than limit
bytes.
Shuts down app (with code 75 which means 'temporal failure').
BSD