Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serilog File/RollingFile sink and buffering

Tags:

serilog

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?

like image 594
Dissimilis Avatar asked Jan 26 '16 17:01

Dissimilis


1 Answers

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.

like image 71
Nicholas Blumhardt Avatar answered Nov 09 '22 23:11

Nicholas Blumhardt