whiner

    0.1.1 • Public • Published

    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

    • emergemerg in journald, error in bole,
    • alertalert in journald, error in bole,
    • critcrit in journald, error in bole,
    • errorerr in journald, error in bole,
    • warnwarning in journald, warn in bole,
    • noticenotice in journald, info in bole,
    • infoinfo in journald, info in bole,
    • debugdebug in journald, debug in bole.

    Notice: emerg triggers a broadcast message with journald, use it wisely.

    License

    MIT.

    Install

    npm i whiner

    DownloadsWeekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • chalker