Search code examples
c#event-log

Enumerating special event logs in C#


I am trying to get a list of the "special" event logs in C#, like the "Microsoft\Windows\Audio\CaptureMonitor" log and all the others like it. They don't seem to be returned when I use System.Diagnostics.EventLog.GetEventLogs(). Is there a special way to get a list of all the special event logs?


Solution

  • I'll be honest and admit I don't know how these views tie into EventLogs and EventSources but take a look at the registry key:

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels

    And see if that starts you down the right path. Also checkout:

    How do I create a hierarchy of lognames in the Windows event system?