Winston Timestamp Colorizer Format
this is a simple library for adding colorization to timestamps of winston.
installation:
npm install --save winston-timestamp-colorize
usage:
just add winston-timestamp-colorize to your winston formats after winston.format.timestamp()
const winstonTimestampColorize = ; winston;
you can pass an optional {color: '...' } parameter to winstonTimestampColorize to change the color of timestamp. available colors are:
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- gray
- grey
full example:
const winston = ;const winstonTimestampColorize = ; // creating the logger instanceconst logger = winston; // log with it ;)logger;