serilog-sinks-xamarin icon indicating copy to clipboard operation
serilog-sinks-xamarin copied to clipboard

newline not working in DefaultAndroidLogOutputTemplate

Open clnorris opened this issue 2 years ago • 0 comments
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.

clnorris avatar Mar 09 '23 19:03 clnorris