While writing a windows service, I created a console version for debugging use. I wanted this console to display all
the logging, in real time, so I could see things were working. A bit of a search revealed that ColoredConsoleAppender
was the desired class, so I added code to set things up.
But, it didn’t work. Not at all. Back to the search engines.
Eventually, I found the (odd) solution.
Before adding the appender into the log4net repository, you need to activate it:
Once this is done, everything started working perfectly.
Not the way I’d write it - requiring odd incantations or other ceremony on the part of a class consumer seems fairly unfriendly.
Comments
blog comments powered by Disqus