From 59b54437eb90ce49309a5b34b44a7a1b619f81f5 Mon Sep 17 00:00:00 2001 From: Matthias Gaber Date: Fri, 20 Mar 2015 11:28:19 +0100 Subject: [PATCH] File-Transport should be using the operating systems end of line, not the Unix one, by default. --- lib/winston/transports/file.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/winston/transports/file.js b/lib/winston/transports/file.js index bc1438687..54482f92f 100644 --- a/lib/winston/transports/file.js +++ b/lib/winston/transports/file.js @@ -15,7 +15,8 @@ var events = require('events'), common = require('../common'), Transport = require('./transport').Transport, isWritable = require('isstream').isWritable, - Stream = require('stream').Stream; + Stream = require('stream').Stream, + osEOL = require('os').EOL; // // ### function File (options) @@ -76,7 +77,7 @@ var File = exports.File = function (options) { this.prettyPrint = options.prettyPrint || false; this.label = options.label || null; this.timestamp = options.timestamp != null ? options.timestamp : true; - this.eol = options.eol || '\n'; + this.eol = options.eol || osEOL; this.tailable = options.tailable || false; this.depth = options.depth || null; this.showLevel = options.showLevel === undefined ? true : options.showLevel;