src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/console.js in passenger-6.0.12 vs src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/console.js in passenger-6.0.13

- old
+ new

@@ -5,10 +5,11 @@ * MIT LICENCE * */ var events = require('events'), + os = require('os'), util = require('util'), common = require('../common'), Transport = require('./transport').Transport; // @@ -29,10 +30,11 @@ this.label = options.label || null; this.logstash = options.logstash || false; this.depth = options.depth || null; this.align = options.align || false; this.stderrLevels = setStderrLevels(options.stderrLevels, options.debugStdout); + this.eol = options.eol || os.EOL; if (this.json) { this.stringify = options.stringify || function (obj) { return JSON.stringify(obj, null, 2); }; @@ -112,12 +114,12 @@ align: this.align, humanReadableUnhandledException: this.humanReadableUnhandledException }); if (this.stderrLevels[level]) { - process.stderr.write(output + '\n'); + process.stderr.write(output + this.eol); } else { - process.stdout.write(output + '\n'); + process.stdout.write(output + this.eol); } // // Emit the `logged` event immediately because the event loop // will not exit until `process.stdout` has drained anyway.