Write to the Event Log C#

/ Published in: C#
Save to your folder(s)

Output your errors to the Windows event log. Very effective to output from try catch blocks.

Copy this code and paste it in your HTML
  1. using System.Diagnostics;
  4. EventLog.WriteEntry("Error Title", exp.Message, System.Diagnostics.EventLogEntryType.Error);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.