log4-nodejs
v3.1.1
Published
Node.js log generator for log4 engine
Downloads
331
Maintainers
Readme
log4-nodejs
log4 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) - 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("log4-nodejs")();
Tests
$ npm test