The Current Output of RollingFile Sink for Date time is as follows
2015-04-06 18:40:54.400 +10:00 [Information] Hello World!
Is there anyway to remove the TimeZone Offset? +10:00
. To Achieve the following output;
2015-04-06 18:40:54.400 [Information] Hello World!
In my case, the timezone offset is superfluous fluff which is just cluttering my Text Log.
You can specify the outputTemplate
parameter to the .RollingFile()
configuration method:
.WriteTo.RollingFile(
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level}] {Message}{NewLine}{Exception}")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With