New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

raw-log

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raw-log

Tiny and fast debugging and logging tool.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

raw-log

Tiny and fast debugging and logging tool.

  • Multiple logging levels with different colors.
  • process._rawDebug() instead of console.log().
  • Milisecond diff based on process.hrtime().
  • 100% code coverage.
  • Requires Node 6+.

Installation

npm i -S raw-log

Quickstart

RAW_LOG=true node my-module.js

const { info, error } = require('raw-log')('my-module')

info('hello world')
// => INFO  | my-module | +0.11ms | <white> hello world </white>

error(new Error('goodbye, cruel world'))
// => ERROR | my-module | +0.71ms | <red> goodbye, cruel world </red>

Levels

  • debug: grey; while developing
  • info: white; normal behavior
  • warn: yellow; incorrect behavior; prints Error.message
  • error: red; something broke; prints Error.message

Note: Using RAW_LOG=true enables all levels. If you want to log only specific levels, e.g. critical levels: use RAW_LOG=warn,error.

License

WTFPL – Do What the F*ck You Want to Public License.

Made with :heart: by @MarkTiedemann.

FAQs

Package last updated on 09 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts