I'm using the package Serilog.Sinks.File I want to disable timestamp just for few messages without creating another instance of LoggerConfiguration for example-
Log.Logger = new LoggerConfiguration().WriteTo.File("logs/log.txt", outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] {Message:lj}{NewLine}").CreateLogger();
Output:
2023-03-10 05:33:24 [INF] App started
2023-03-10 05:33:24 [INF] Some process1
2023-03-10 05:33:24 [INF] file1
2023-03-10 05:33:24 [INF] file2
2023-03-10 05:33:24 [INF] file3
2023-03-10 05:33:24 [INF] Operation completed.
I want:
2023-03-10 05:33:24 [INF] App started
2023-03-10 05:33:24 [INF] Some process1
file1
file2
file3
2023-03-10 05:33:24 [INF] Operation completed.
How to achieve this?