Closed nfsiam closed 11 months ago
@nfsiam Were you able to resolve your issue with the Serilog email sink as I'm having the same issue.
In my case, it was just a little wait. The problem arises when we set a breakpoint on the next method, or sending an email is the last step of the application. For this purpose, I created a very advanced waiting method, which I recommend to copy after calling the logger :)
for (int i = 0; i < 1000000; i++) { Console.WriteLine(i); }
Hi someone managed to solve the issue?
Add this and attach logs, it should indicate why it is not sending an email:
Serilog.Debugging.SelfLog.Enable(Console.WriteLine);
Log.CloseAndFlush()
or disposing your root Logger
should resolve this without any spin waiting.
Hello, I am using the below code, but it is not working, not even giving me any error. I am also using MSSql Sink for DB logging (for that, the config is coming from
appSettings.json
), and it is working fine. I have tried to use the email sink by loading config fromappSettings.json
, but it doesn't work either. Any help is appreciated.