Winston console formatter
Pretty print console formatter in yaml like style
Install
npm install winston-console-formatter
This is custom config for default winston console transform.
Usage
const winston = ;const wcf = ; const logger = level: 'silly'; const formatter timestamp = ; logger; logger;logger;logger;logger;logger;logger;
API
wcf.config(options)
options
Type: Object
options.types
Type colors configuration for yamlify-object package
Default:
;
To disable types colors pass false
:
;
options.colors
Message colors by log levels
Default:
const clc = ; ;
To disable colors pass false
:
;
options.stackTrace
Showing passed to meta object stack
or trace
prop
Type: boolean
Default: true
options.meta
Showing meta object
Type: boolean
Default: true
options.prefix
Type: string
Default: ''
options.postfix
Type: string
Default: ''
Message line
winston-console-formatter can take winston label
option to enrich message
line:
logger; logger;
Also winston-console-formatter can handle from
and stack
props from meta
object to enrich message line
from
const meta = from: 'Browser';logger;
stack
try undefined; catch e logger;