So this cost me an hour. I had some code that ran perfectly under unit tests. However, in the live application ( that uses Unity with Interception ), I had NullReferenceExceptions when instantiating some of the classes when calling the logger. Turns out, when using interception, it's not a good idea to GetCurrentClassLogger(). That will cause your code to break. Use GetLogger() instead.
No comments:
Post a Comment