31

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.

Pankwood
  • 1,799
  • 5
  • 24
  • 43
jitm
  • 2,569
  • 10
  • 40
  • 55

1 Answers1

56

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.

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
João Angelo
  • 56,552
  • 12
  • 145
  • 147
  • In Event Viewer >> Windows Logs >> Application. Then filter/scroll for entries where the source is the one configured in the EventLogAppender log4net appender configuration using . – Chucky Apr 24 '19 at 08:07