UNPKG

brush_cli

Version:

A tool for creating and developing cmos PC Framework project.

19 lines (14 loc) 509 B
var winston = require('../lib/winston'); function myPrettyPrint(obj) { return JSON.stringify(obj) .replace(/\{/g, '< wow ') .replace(/\:/g, ' such ') .replace(/\}/g, ' >'); } var logger = new (winston.Logger)({ transports: [ new (winston.transports.Console)({ prettyPrint: myPrettyPrint }), ] }); logger.info('Hello, this is a logging event with a custom pretty print', { 'foo': 'bar' }); logger.info('Hello, this is a logging event with a custom pretty print2', { 'foo': 'bar' });