How to use Winston to specify the path in the console?

Found the logger code, this code calculated the current path to the path variable:
function getLogger(module) {

 var path = module.filename.split('/').slice(-2).join('/');

 return new winston.Logger({
 transports: [
 new winston.transports.Console({
 colorize: true,
 level: (ENV == 'development') ? 'debug' : 'error',
 lavel: path

As it is now display in the console this way? To run:"the message";)
in the console output like this:
info: the WAY of the message
July 4th 19 at 23:55
1 answer
July 4th 19 at 23:57
Winston supports custom message format.
Only need to set a formatter function that accepts an object with the following parameters: timestamp, level, message, meta.
formatter: function(options) {
 return options.level + ': '+ path + '' options.message;
Thanks for the reply! - june.Murphy73 commented on July 5th 19 at 00:00

Find more questions by tags Node.js