-1

I am using asp.net MVC application. In the my application, I need fetch internal exception data of the serilog. Serilog provides get the exception data from the following code:

Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
HiTrustLog.HiTrustLogger.Information(log);
Serilog.Debugging.SelfLog.Disable();

Serilog Library writes to file exception data only once and second time onwards not writing. Just, I needs it write exception data when internal exception occurs

Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
Raju Gaddam
  • 128
  • 3
  • 14

1 Answers1

0

The problem ILogger created only once in the global asax.cs. so , selflog writes log one time. When log event fire before create Ilogger it's works fine

Raju Gaddam
  • 128
  • 3
  • 14