I’m trying to figure out is it possible and how to implement this functionality using Enterprise Library Logging.
In my current code I’m handling exceptions like this:
exceptionManager.HandleException(ex, "LogException");
What I want is to log this exception, but gather additional context information, for example assembly version, what I need to extend \ implement to log this additional context information?
Probably the easiest way is to use the
Dataproperty of the exception to attach your additional context information. Enterprise Library will then map all of theDataelements to Extended Properties.Then make sure the log template has the extended properties set to log: