Wild Logger
Wild Logger supports custom colors, verbosity settings, timestamp controls, and logging to Bunyan.
Installation
npm install wild-logger
Example
Supported Colors
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- gray
- grey
- rainbow
- zebra
- america
- trap
- random
Example Config
"logger": "ts": "enabled": true "color": "gray" "levels": "err": "enabled": true "color": "red" "warn": "enabled": true "color": "yellow" "endpoint": "enabled": true "color": "green" "db": "enabled": true "color": "cyan" "rainbow": "enabled": true "color": "rainbow" "usa": "enabled": true "color": "america" "annoying": "enabled": false "color": "zebra" "bunyan": "enabled": false "options": "name": "test-wild-logger"
Example Usage
const config = ;const log = configlogger; ;;;;;;;; // won't log because "annoying" is disabled in config
console.log Overridable
Wild Logger allows you to override console.log()
const log = require("wild-logger")(config.logging);
console.log = log;
console.log("rainbows for days", "rainbow");