Change default newline for FileLogger
Brought to you by:
jvarszegi
Hi,
I noticed that the default newline for FileLogger is set to "\n".
This would be fine, except on Windows, stack traces use "\r\n" in them.
So when I look at my log file (at least in GVim) I see "^M" characters on the stack traces (it detects the file as Unix format, so the editor treats _all_ line endings as such and prints the carriage returns because they don't belong).
Point is, you can get the default system newline character from the System.Environment.NewLine property. So why not use that instead of setting the newline character to "\n"? It saves a line of user code when the newline is different on their system.
Thanks. This is a great tool.
-Tom