universal-logger-browser
Browser plugins for universal logger
Minimal
Styleable
Installation
npm install --save universal-logger universal-logger-browser
Usage
;;; const log = ; log;log; log;log;log;log;log;log;
API
Minimal
Name | Type | Default | Description |
---|---|---|---|
formatter | function(context, messages) | Custom log formatter. | |
showSource | boolean | true | Show the source line number of the caller. Note that you need to call log.enableStackTrace() to capture stack frames. |
useNativeConsoleMethods | boolean | true | Whether to use native console methods for trace, debug, info, warn, and error. |
Styleable
Name | Type | Default | Description |
---|---|---|---|
colorized | boolean | true | Show colorized output. |
showSource | boolean | true | Show the source line number of the caller. Note that you need to call log.enableStackTrace() to capture stack frames. |
showTimestamp | boolean | false | Show timestamp. |
formatTimestamp | function(timestamp) | Convert timestamp to string. | |
style | object | See styleable-style.js | Custom styles. |
License
MIT