We use the log4net to log the winform application’s event and error.
Our customer want check the log file during the application running.
But I can’t find out when and how the log4net do the write(commit) operation.
And how to meet the customer’s requirement, except creating another logger by myself.
Any help? Thanks.
We use the log4net to log the winform application’s event and error. Our customer
Share
If you’re using the
FileAppender, this appender inherits theTextWriterAppender, which in turn exposes theImmediateFlushproperty. The value of this property istrueby default, and forces the appender to do aFlush()on the underlying stream for each Append operation.Depending on how you envision the customer “monitoring” the log file, an idea could be to enable monitoring from within your application. This can be done by in addition to appending to a file, using the MemoryAppender and reading events from that appender.