Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

console-inject

h6932MIT1.0.8

Console logging with color, timestamp, filename and line number.

console, log, timestamp, linenumber, filename, color

readme

console-inject

Node.js console logging with color, timestamp, filename and line number.

npm package

Preview

console-inject

Installing

npm install console-inject

Usage

In consideration of the console usage, console-inject overrides console.log, console.info, console.warn, console.trace, console.debug, console.error. So, it's ok that you just require "console-inject" to inject before the main program entry point.

require('console-inject');

Of course, you can also inject by command, console-inject supports various Node.js application starters such as node, nodemon, etc. In that way, you can enjoy the console-inject features without changing the program.

console-inject node app.js