I have recently start using Enterprise library 5.0 logging block and have two observations.
My format for logging is timestamp, severity and the message itself. I could not find any overload of Logger.Write method that takes message and severity level parameters. Obviously I can use other overloads that take things like category, eventId, priority etc. It’s a bit strange that there is no overload just for message and severity like
public static void Write(object message, TraceEventType severity);
Does anyone has same observation or am I missing anything?
I also did not find any overload for Logger.Write that takes Exception object parameter. That’s kind of surprising for me also. It would be nice to have an overload that take exception object and logs things like stacktrace, inner exception etc. Anyone else find it surprising too?
I am guessing that other frameworks like (log4net, NLog) have this type of interfaces available in their APIs?