static private ReportEvent ( string message, string category = "Event", EventLogEntryType type = EventLogEntryType.Information ) : void | ||
message | string | |
category | string | |
type | EventLogEntryType | |
return | void |
static void ReportEvent(string message, string category = "Event", EventLogEntryType type = EventLogEntryType.Information)
{
Trace.WriteLine(message);
try
{
EventLog.WriteEntry(Const.AppName, message, type);
}
catch (Exception exc)
{
Trace.WriteLine(exc);
}
lock (TrackerSync)
{
if (_tracker != null)
_tracker.Log(category, message);
}
}