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
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
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
*See What's new in the documentation for additional details
- Adds support for passing a function method as data
- Function evaluation occurs only when the log level will be written
- Typescript declarations
- optional - Code location from the stack trace
- optional - Console colors
- Breaking Changes