1.3.1 • Published 6 years ago

tlf-log v1.3.1

Weekly downloads
15
License
GPL-3.0
Repository
github
Last release
6 years ago

tlf-log

npm version npm total downloads npm monthly downloads License
Build status Coveralls
Dependency status DevDependency status

A simple module for easy logging

Installation

npm i -S tlf-log

Typical Usage

const log = require("tlf-log");
log.trace("Starting up!");

Documentation

FunctionDescription
log.<level>(msgs)Logs the given messages at the specified level.
log.<level>_(msgs)Logs the given messages at the specified level without printing a newline.
log._setLevel(<lvl>)Sets the minimum level to log -- all lower levels will be ignored. Can also be set to 'silent' to silence all but fatal messages.
log._addLevel(<name>, <opts>)Adds a new log level. Valid options are "before", "after" and "afterLog".
log._indent()Indents the next messages by 2 spaces.
log._deindent()Deindents the next messages by 2 spaces.
log._prefix(<name>)Adds a prefix to the next messages.
log._deprefix(<name>)Removes the most recent prefix.
1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago