I'm using EntLib 4.1 for logging. When I have an exception handled in the Application_Error of Global.asax.cs, I log the error with a category of 'Error'. I assumed that the event log type would be 'Error', but instead the event log entry is written with a type of 'Warning' and category of 'Web Event'.
public static void Write(Exception ex)
{
var log = new LogEntry
{
Message = ex.Message
};
Logger.Write(log, "Error");
}
Is there some disconnect between an event log type and log category?
How can I get my web application to log with a type of 'Error' from Enterprise Library?