node.js - rename captains-log exposed methods -
is there way change methods exposed captains-log? i'm working on sailsjs project. need log levels , calls be: fatal\error\warn\info\debug managed changed log levels, doing in config.log file:
var winston = require('winston'); winston.setlevels( { crit: 1, error: 2, warn: 3, info: 4, debug: 5, verbose: 6 }); module.exports.log = { level: 'info', custom: new winston.logger({ transports: [ new winston.transports.console(), new(winston.transports.file)( { filename: './.tmp/log.log' }), ] }) }; but can't find way rename crit, fatal, can do: sails.log.fatal instead of sails.log.crit
thanks!
Comments
Post a Comment