Is there anyway to programmably flush the buffer in log4net

Posted by Henrik Stenbæk on Stack Overflow See other posts from Stack Overflow or by Henrik Stenbæk
Published on 2010-01-12T00:29:39Z Indexed on 2010/06/14 15:52 UTC
Read the original article Hit count: 255

Filed under:
|
|
|

Hi

I'm using log4net with AdoNetAppender. It's seems that the AdoNetAppender has a Flush method. Is there anyway I can call that from my code?

I'm trying to create an admin page to view all the entries in the database log, and I will like to setup log4net with bufferSize=100 (or more), then I want the administrator to be able to click an button on the admin page to force log4net to write the buffered log entries to the database (without shutting down log4net).

Is that possible?

© Stack Overflow or respective owner

Related posts about log4net

Related posts about buffer