var path = require('path'),
    winston = require('winston');

var logDir = process.env.NODE_LOG_DIR || path.join(process.cwd(), 'log');
var environment = process.env.NODE_ENV || 'development';

var logger = new (winston.Logger)({
  transports: [
    new (winston.transports.File)({
      filename: path.join(logDir, environment + '.log'),
      json: false,
    })
  ],
  levels: winston.config.syslog.levels,
});

module.exports = logger;

@@ -368,46 +368,330 @@
  %5D,%0A
+%0A
   
-levels: winston.config.syslog.levels
+// Use syslog levels, but don't use Winston's built-in levels, since those%0A  // are currently broken: https://github.com/flatiron/winston/issues/249%0A  // levels: winston.config.syslog.levels,%0A  levels: %7B%0A    debug: 0,%0A    info: 1,%0A    notice: 2,%0A    warning: 3,%0A    error: 4,%0A    crit: 5,%0A    alert: 6,%0A    emerg: 7%0A  %7D
 ,%0A%7D)

Fix winston syslog levels that was preventing errors from showing up.