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

Package detail

taglog

venkatperi22MIT1.1.2

NEEDS DESCRIPTION

readme

taglog

Log with tags

Installation

Install with npm.

npm install --save taglog

Examples

log = require('taglog')("TAG")

log.i "hello, world"
# => I/10:33:14:9420[TAG] hello, world

API

Logging Levels

Supports five levels: debug, verbose, info, warn, error.

Create Logger

taglog(tag)

  • tag is a {String}

Methods

log.level(level)

Set the minimum log level. Default is info. Logs more verbose that the set level will be omitted.

log.colors(flag)

  • flag is a {Boolean} to use colors on the output.

log.<level>(item[, item...])

  • item One or more items of any time Logs the supplied items at the specified level

Aliases:

  • log.debug()
  • log.d()
  • log.verbose()
  • log.v
  • log.info()
  • log.i()
  • log.warn()
  • log.w()
  • log.error()
  • log.e()