tlf-log
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/tlf-log package

1.3.1 • Public • Published

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

Function Description
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.

Readme

Keywords

Package Sidebar

Install

npm i tlf-log

Weekly Downloads

10

Version

1.3.1

License

GPL-3.0

Unpacked Size

66.5 kB

Total Files

18

Last publish

Collaborators

  • thislooksfun