using System; using System.Diagnostics; namespace Utils { /// /// System exception logger /// public static class Logger { /// /// Log exception to windows application event log /// /// Event Log source /// Exception to log public static void Log(string source, Exception exception) { EventLog logEntry = new EventLog {Source = source}; logEntry.WriteEntry(exception.Message, EventLogEntryType.Error); } } }