code: function fromFile(filename, callback) {
    var configFile = filename || '../config/winston-config.json';
  
    fs.exists(configFile, function (exists) {
      if (exists) {
        var winstonConf = require(configFile).logging;
  
        fromJson(winstonConf, callback);
      } else {
        callback(new Error('No config file found (at least provide a config/winston-config.json) with winston configuration'), winston);
      }
    });
  }
docs: initialize Winston logging mechanism from file