Hi I need to log my exceptions to MOM.
I am trying to log in to Event Viewer using the follwoing code:
LogEntry _logentry = new LogEntry();
_logentry.Priority = 2;
_logentry.EventId = 4000;
_logentry.Severity = TraceEventType.Information;
_logentry.Title = "My Title";
_logentry.Message = "Message from Log Entry Object";
Logger.Write("This is being written to text file", "DebugCategory", 2, 2000, TraceEventType.Information, "My method");
I have configured the Enterprise Lib Conofg and have added it to the solution as app.config.
When I debug I can see logentry object having all the values from the cofnig file. But it does not write into Event Viwer
Can anyone pls help.