I'm relatively new to Microsoft Enterprise Library. I'm currently explore using Enterprise Library 5 to do logging on exception thrown by the system into a text file.
Question 1
I came across LogEntry
in Microsoft.Practices.EnterpriseLibrary.Logging
comes with ErrorMessages
and Message
.
I hope that you all able to explain on which circumstances should use either ErrorMessages
or Message
? I can't find any definition on those two variable at the moment.
If I caught an Exception, should I assign ex.Message
into ErrorMessages
or Message
?
Question 2
I also found out that there are Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging
. May I know is this a more proper way to log exception instead of using Microsoft.Practices.EnterpriseLibrary.Logging
?