5
votes

It looks like Serilog File/RollingFile sink flushes stream after each logger call.

Isn't this fundamental performance hit? For example Nlog has some kind of AsyncWrapper for queuing log events and writing them in batch'es using background thread.

What are the solutions if I want to minimize latency when using file sink?

1

1 Answers

5
votes

Rebuilding the code yourself is the only option for this currently.

I've added https://github.com/serilog/serilog/issues/650 for hopeful inclusion in the upcoming Serilog v2.