Windows Event Viewer and log4net

jitm picture jitm · Apr 8, 2010 · Viewed 26.1k times · Source

I have idea to write errors from my application to the Windows Event Viewer using log4net. Can I do it or not? And if I can, how :). Thank you.

Answer

João Angelo picture João Angelo · Apr 8, 2010

log4net supports a EventLogAppender so, yes, you can do it. How? You can start by checking the log4net configuration examples for that appender.

If you encounter any specific problem you can update your question with more details so people can help you better.