log4js-node icon indicating copy to clipboard operation
log4js-node copied to clipboard

os.EOL should be tested before being returned.

Open robertlight opened this issue 2 years ago • 0 comments

If we are using log4js inside a browser, os.EOL is undefined.

therefore, I would recommend the following line: https://github.com/log4js-node/log4js-node/blob/bd457888eb91b9e932fe8f66d720cf2d9d6442f4/lib/layouts.js#L225

should be: return os.EOL?os.EOL:'\n';

robertlight avatar Nov 15 '23 14:11 robertlight