0.3.1 • Published 3 years ago

slf-debug v0.3.1

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

SLF Debug Driver

SLF Debug Driver is a factory for using Debug.js for logging SLF events.

Purpose

Provide colored logs with timestamps and debug level info to the terminal.

SLF Debug Output

Installation

Install the SLF Debug Driver as well as Debug.js

npm install slf-debug debug

Usage

Provide the SLF Debug Driver as the factory when configuring SLF. Use Debug.js to configure which logs should be displayed.

import debug from 'debug';
import { LoggerFactory } from 'slf';
import slfDebug from 'slf-debug';

debug.enable('viewdb:*');
LoggerFactory.setFactory(slfDebug);