slf-debug
v0.3.1
Published
Surikat Log Facade, debug-js/debug driver
Downloads
1,845
Readme
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.
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);