whiner
v0.1.1
Published
A logger that tries to do the correct thing
Downloads
5
Readme
whiner
This is a small wrapper around bole and systemd-journald.
It logs everything to journald by default, but supports streaming JSON logs to
other sources, using .output
inherited from bole.
Usage
const log = require('whiner')(module);
log.error(error);
log.debug(message, fields);
or
const log = require('whiner')('label');
log.error(error);
log.debug(message, info);
Log levels
emerg
—emerg
in journald,error
in bole,alert
—alert
in journald,error
in bole,crit
—crit
in journald,error
in bole,error
—err
in journald,error
in bole,warn
—warning
in journald,warn
in bole,notice
—notice
in journald,info
in bole,info
—info
in journald,info
in bole,debug
—debug
in journald,debug
in bole.
Notice: emerg
triggers a broadcast message with journald, use it wisely.
License
MIT.