private String PrepareSyslogEvent(String evebntLogName, EventLogEntry eventLogEntry)
{
// Prepare message will sent to syslog server
String body = eventLogEntry.Source.Replace(" ", "_") + " Type: " + eventLogEntry.EntryType.ToString();
if (eventLogEntry.Category != null)
body = body + ", Category: " + eventLogEntry.Category;
if (eventLogEntry.EventID != 0)
body = body + ", Event ID: " + eventLogEntry.EventID;
if (eventLogEntry.UserName != null)
body = body + ", User: " + eventLogEntry.UserName;
body = body + ", Description: " + eventLogEntry.Message;
body = body.Replace('\r', ' ');
body = body.Replace('\n', ' ');
return body;
}