SumoLogic / sumologic-net-appenders

Several appenders for .NET developers to use that send logs straight to SumoLogic.
Apache License 2.0
23 stars 39 forks source link

Buffered messages not flushed when application exits #84

Closed mikesigs closed 4 years ago

mikesigs commented 5 years ago

The title pretty much speaks for itself.

We are using the Buffered appender and have found (during some local testing) that any messages in the buffer do not get sent when the process exits.

There does not appear to be any configuration setting to control this. The best I think we can do is to reduce the duration in either MaxFlushInterval or FlushingAccuracy.

I feel like this could benefit from some Dispose logic to flush the buffer. That would at least prevent against data loss in a planned shutdown. Not much you can do if the process suddenly exits.

Perhaps I am simply missing something though.

Thanks!

snakefoot commented 5 years ago

Using NLog, log4net, Serilog or AspNetCore ?

mikesigs commented 5 years ago

@snakefoot when I posted this the problem was with log4net. Since then we have migrated half of our services to Serilog but they're containerized and just write to the console.

snakefoot commented 4 years ago

@guptakeshav-sumo Think this is resolved with #92 (and #93)

guptakeshav-sumo commented 4 years ago

Yes, should be fixed now :)