Almost every application needs to write logs and almost every developer has tried to implement its own logging system. Sometimes it is really reasonable but usually Windows EventLog is a better choice:
- It's easy to write there, two API calls only is necessary to get the first result;
- It is standard, well-known and very popular. Windows has built-in event log viewer;
- It is multi-language, filterable and can be accessed over network;
As a result a lot of application use Windows EventLog as a log storage. On the other side there are a lot of tools that help users and admins to collect and analyze these logs. Try to search for "windows event log management software" keywords and you will get over two million links to alternative event log viewers, monitors, analysis systems and so on. That's why use of Windows EventLog saves your time on both logging tools development and viewing tools development.
While adding EventLog record is simple enough (RegisterEventSource + ReportEvent) the result is not beautiful without several additional operation. Continue...