I am using ColoredConsoleAppender, I am worried about if it will ever hang my application. Anyone has experience
From the log4net site: http://logging.apache.org/log4net/release/faq.html
No. log4net is not reliable. It is a best-effort and fail-stop logging system.
By fail-stop, we mean that log4net will not throw unexpected exceptions at run-time potentially causing your application to crash. If for any reason, log4net throws an uncaught exception (except for ArgumentException and ArgumentNullException which may be thrown), please send an email to the [email protected] mailing list. Uncaught exceptions are handled as serious bugs requiring immediate attention.
I personally use it all the time and have never had an issue.
@ralf.w. already shows the full symptoms. I can rephrase as I recently meet the same issue too.
Then on a few machines (or remote desktop sessions), log4net will hang the console application, and in the hang dumps you can see it weirdly waits for a write to the stream to finish.
Hard to reproduce on a normal machine (like mine), so hard to investigate further though log4net is open source.
The workaround can be as simple as show the console application as minimized (instead of hidden), and/or change other ProcessStartInfo settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With