This one really has me scratching my head....
I have been using log4net (currently version 1.2.10) in an application for some time. While adding a new option to the application, I noticed that even though the log4net Debug, Error, etc. methods were getting called items from that log source were not being seen by the console appender.
Having checked the obvious (like making sure there was no filtering involved), I noticed something else that was strange. If I have more than one appender (e.g. a log file appender and a UDP appender) then the appenders will sometimes see different subsets of the log messages. Which subset they see appears to be random, but typically when the problem occurs they will fail to see all messages from a given log source.
Why might this be happening, and what can I do about it since lost messages mean the log file cannot be trusted to show an accurate picture of remote failures?
[Additional information below added Jan 19th, 2010]
I finally took a good look at the ILog object getting passed back in response to the call
LogManager.GetLogger(typeof (MyTypeHere));
On some occasions, I am getting an ILog object with Debug, Info, Warning, Error etc set to false. On other occasions the ILog object has them correctly set to true. Since my code does nothing to manipulate those flags, on the occasions when my code is passed the "disabled" ILog object messages from my code (understandably) do not get propagated at all.
I still cannot explain the apparent discrepancy between the two appenders.