Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b5eb28

Browse files
author
John Engler
committed
Update dateFile EOL usage to be consistent with appender.
From the looks of the Travis CI failure, this could be the issue causing failures. Not sure as I can't reproduce locally. However, it is still an inconsistency and worth fixing.
1 parent 633ed3c commit 3b5eb28

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/dateFileAppender-test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ var vows = require('vows')
44
, path = require('path')
55
, fs = require('fs')
66
, sandbox = require('sandboxed-module')
7-
, log4js = require('../lib/log4js');
7+
, log4js = require('../lib/log4js')
8+
, EOL = require('os').EOL || '\n';
89

910
function removeFile(filename) {
1011
return function() {
@@ -134,7 +135,7 @@ vows.describe('../lib/appenders/dateFile').addBatch({
134135
teardown: removeFile('date-file-test.log'),
135136

136137
'should load appender configuration from a json file': function(err, contents) {
137-
assert.include(contents, 'this should be written to the file' + require('os').EOL);
138+
assert.include(contents, 'this should be written to the file' + EOL);
138139
assert.equal(contents.indexOf('this should not be written to the file'), -1);
139140
}
140141
},
@@ -161,7 +162,7 @@ vows.describe('../lib/appenders/dateFile').addBatch({
161162
, thisTime = format.asString(options.appenders[0].pattern, new Date());
162163
fs.writeFileSync(
163164
path.join(__dirname, 'date-file-test' + thisTime),
164-
"this is existing data" + require('os').EOL,
165+
"this is existing data" + EOL,
165166
'utf8'
166167
);
167168
log4js.clearAppenders();

0 commit comments

Comments
 (0)