c0shea / Seq.Client.EventLog

Writes Windows Event Log entries to Seq
MIT License
33 stars 13 forks source link
eventlog seq windows

Seq.Client.EventLog

Build status

Seq is a fantastic tool for handling structured logs in .NET apps. There's a lot of value in having a centralized log repository that can ingest events from many sources.

The trouble, however, is that applications beyond your control write useful information to the Windows Event Logs. That's where the EventLog service comes in. Define the logs and filters you care about and the service takes care of ingesting them into Seq.

Get Started

  1. Download the latest release of Seq.Client.EventLog.
  2. Extract it to your preferred install directory.
  3. Edit the Seq.Client.EventLog.exe.config file, replacing the SeqUri with the URL of your Seq server. If you configured Seq to use API keys, also specify your key in the config file.
  4. Edit the EventLogListeners.json file. There are sensible defaults in place, but you can change them you suit your needs.
  5. From the command line, run Seq.Client.EventLog.exe /install. This will install the Windows Service and set it to start automatically at boot.
  6. From the command line, run net start Seq.Client.EventLog to start the service.
  7. Click the refresh button in Seq as you wait anxiously for the events to start flooding in!

Enriched Events

Events are ingested into Seq with a few useful properties that allow for easy searching.

Event Log Listeners

The JSON config file allows for multiple listeners to be defined. Each one should be a new object in the array.

Sample

[
  {
    "LogName": "Application",
    "LogLevels": [ 1, 2 ],
    "ProcessRetroactiveEntries": true
  }
]