log-node
v8.0.3
Published
Node.js log generator for log engine
Downloads
3,832,437
Maintainers
Readme
log-node
log writer for typical Node.js processes
- Printf-like message formatting
- Configure log level visbility threshold through
LOG_LEVEL
env variable (defaults tonotice
) - Extra debug output can be controlled via
LOG_DEBUG
env variable (fallbacks toDEBUG
if provided) - Optionally outputs timestamps by log messages, controlled by
LOG_TIME
env variable - Outputs colored logs if terminal supports it (can overriden through
DEBUG_COLORS
env variable) - Object inspection depth defaults to
4
, but can be overriden viaLOG_INSPECT_DEPTH
(fallbacks toDEBUG_DEPTH
if provided) - Writes to
stderr
stream.
Usage
At beginning of main module of your program invoke:
require("log-node")();
Tests
$ npm test