C# .NET Syslog Server with SQL

C# .NET Syslog Server with SQL


There are 3 core classes, incorporated into a Windows Service application.

The SyslogListener class implements an RFC3164 compliant syslog listener which parses syslog messages sent to any interface the class is bound to.

The MemoryBuffer class class takes care of buffering incoming syslog messages in memory and submitting them to the SqlUpdater in batches, rather than keeping the database occupied with drip-fed messages.

The SqlUpdater class simply takes care of inserting SyslogMessage records into an SQL database.

The SyslogService Windows Service application class brings it all together:

  1. create the SqlUpdater class and establishes a connection to the SQL server
  2. create the MemoryBuffer class, and let it know about the SqlUpdater for which it will act as a buffer
  3. establish an event handler for the SyslogListener message-received event, to save messages into the memory-buffer


code is available for download from here .


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s