1.1.0 • Published 4 years ago

littlelog v1.1.0

Weekly downloads
2
License
GPL-3.0-only
Repository
github
Last release
4 years ago

LittleLog

A simple logging utility.

Installation

Install using your favorite package manager:

# using npm
npm install --save littlelog

# using yarn
yarn add littlelog

Usage

To configure the logging verbosity (defaults to process.env.LOG_LEVEL):

const log = require('littlelog');

/*
 * Possible values are:
 * - SILENT
 * - INFO
 * - DEBUG
 * - TRACE
 */
log.setVerbosity('INFO');

To log messages:

const log = require('littlelog');

log.info('This is an info log.');

log.debug('This is a debug log.');

log.trace('This is a trace log.');