RollingFile.outputTemplate that I use for my shell in the <appSettings> configuration is shown below:
<add key="serilog:write-to:RollingFile.outputTemplate" value="{Timestamp:HH:mm:ss} [{Level}] {Message}{NewLine}{Exception}" />
The output log I get as:
19:55:10 [Information] Application_Start...
However, I also want to output the name of the class (source) from which the log was created, for example -
19:55:10 [Information] [Global.asax.cs] Application_Start...
What needs to be added to value? I added [Source] , but it doesnβt work.
value = "{Timestamp: HH: mm: ss} [{Level}] [Source?] {Message} {NewLine} {Exception}"
source share