Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.31 KB

Readme.md

File metadata and controls

39 lines (23 loc) · 1.31 KB

multi-level-logger

A simple logging module with flexibility for multiple simultaneous log levels through named logs, and optional timestamp, code location, and color inclusion.

Detailed Documentation is available here

Getting Started

Install

npm install multi-level-logger --only=prod

  • Installing with --only=prod is highly recommended as multi-level-logger does not have any run-time dependencies

Quick Start

import { Warn } from "multi-level-logger";

Warn("Hello multi-level-logger");
> 1/1/2018, 12:00:00 PM - [line 3: ./log-example.js] - Hello multi-level-logger

Recent Releases

*See What's new in the documentation for additional details

v2.1.0 - Lazy Evaluation

  • Adds support for passing a function method as data
    • Function evaluation occurs only when the log level will be written

v2.0 - Major Release

  • Typescript declarations
  • optional - Code location from the stack trace
  • optional - Console colors
  • Breaking Changes