Skip to content

Commit

Permalink
Use os.EOL for line endings for text loggers (#590)
Browse files Browse the repository at this point in the history
This change uses `os.EOL` for line endings instead of `\n`
This is useful for those of us using NodeJS on Windows where the easiest log reader is Notepad.exe
Fixes #589
  • Loading branch information
bwknight877 authored and trentm committed Jun 27, 2020
1 parent bfece9f commit 749c66d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bunyan.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ Logger.prototype._emit = function (rec, noemit) {
// Stringify the object (creates a warning str on error).
var str;
if (noemit || this.haveNonRawStreams) {
str = fastAndSafeJsonStringify(rec) + '\n';
str = fastAndSafeJsonStringify(rec) + os.EOL;
}

if (noemit)
Expand Down

0 comments on commit 749c66d

Please sign in to comment.