I was testing a C# method that used log4net for logging, when running the code in the production app the method logged to a log file, but when I executed the method inside a UnitTest I wasn’t getting any logging.

Turns out, I forgot to call XmlConfigurator.Configure(); before calling the method.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.