Last week I had to open an old codebase and fix some bugs(and some failing tests along the way). The project was using the Enterprise Library Logging Application Block. Inside the test project I got some trouble to get the Logger object working.
It took me some time to figure out that you need to configure the Logger instance first:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Logger.SetLogWriter(new LogWriterFactory().Create()); | |
Logger.Write("test", "General"); |