next-log-patcher

1.0.0 • Public • Published

[![Build status][build-image]][build-url] [![Tests coverage][cov-image]][cov-url] [![npm version][npm-image]][npm-url]

next-log-patcher

next-log-patcher 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("next-log-patcher")();

Tests

$ npm test

Package Sidebar

Install

npm i next-log-patcher

Weekly Downloads

37

Version

1.0.0

License

ISC

Unpacked Size

12.7 kB

Total Files

12

Last publish

Collaborators

  • loveryon