serilog-sinks-xamarin
serilog-sinks-xamarin copied to clipboard
newline not working in DefaultAndroidLogOutputTemplate
trafficstars
This bug is in the nitpick category. Most recently observed in Serial.Sinks.Xamarin 1.0.0.
In src/Serilog.Sinks.Xamarin/Sinks/Xamarin/android/LoggerConfigurationXamarinExtensions.cs, the default output template is: const string DefaultAndroidLogOutputTemplate = "[{Level}] {Message:l{NewLine:l}{Exception:l}";
The above does not produce a newline between Message and Exception, so the message and exception are jammed together.
This change produces the intended effect, where a newline precedes the exception: "[{Level}] {Message:l}{NewLine}{Exception:l}"
I can pass my fix via outputTemplate in AndroidLog(), but wondering if the default could be fixed.