0

I am using RollingFileAppender of the log4net package to write logs.

It appears that log4net writes log messages in batches, so sometimes there's like 10-15 seconds delay before message appear in the log file, which I completely understand, as an IO optimization.

However, I have a specific use case, that I would like to have no more than 1 second delay. Is it possible to configure log4net to close file after each log line (or in frequency of 1 second) ?

I went though documentation, and can't see such option. Or perhaps there is some pattern I can follow, some force close that I can add to the code code ?

2

0

Browse other questions tagged or ask your own question.