log-node

8.0.3 • Public • Published

Build status Tests coverage npm version

log-node

log writer for typical Node.js processes

  • Printf-like message formatting
  • Configure log level visbility threshold through LOG_LEVEL env variable (defaults to notice)
  • Extra debug output can be controlled via LOG_DEBUG env variable (fallbacks to DEBUG 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 via LOG_INSPECT_DEPTH (fallbacks to DEBUG_DEPTH if provided)
  • Writes to stderr stream.

Usage

At beginning of main module of your program invoke:

require("log-node")();

Tests

$ npm test

/log-node/

    Package Sidebar

    Install

    npm i log-node

    Weekly Downloads

    848,688

    Version

    8.0.3

    License

    ISC

    Unpacked Size

    19.4 kB

    Total Files

    12

    Last publish

    Collaborators

    • medikoo