So I’ve seen a lot of questions around this issue with generally the only resolution being: “It’s a warning, just ignore this”. Whilst it is safe to do this, for pedants like me there is a true resolution. There are a few places around the net to get this but (like a lot of issues I blog about) you often need to combine the advice. Here’s the true resolution:
You’re most probably here because you have already read my article How to watch your log through your application in Log4Net and you’re thinking “that’s great, but I need to somehow differentiate all of this output!” – either that or you just really need a handy way to format certain keywords within your RichTextBox.
Log4Net is an excellent logging system that allows you to clearly see what your application is doing and when, making it very easy to debug your app during development but especially during production. I have previously demonstrated how to use Log4Net in C# which enables you to log output to your console for the former and to a file for the latter, but recently I had a requirement to also log to screen during production. This is how I achieved it:
During a current project in work (one of many) I required a logging system for recording info and errors during operation so that I can easily and quickly debug the application when it is in service. As I was already aware of the extremely successful Log4j I decided to give its .Net counterpart a chance and have been very happy with it.