In my application, I use log4net, with all types creating their own logger based on their type – e.g. :
private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
As I am developing, I leave the root logger on DEBUG so as to catch all log output from my code.
However, a third party component also uses this same approach, but is generating 100s of log messages a second, none of which I am interested in.
Is it possible to use some sort of wildcarding in the logger configuration, to force all their loggers to only log at WARN, e.g. :
<logger name="com.thirdparty.*">
<level value="WARN"/>
</logger>
[The exact example above, using a * doesn’t work]
You can just specify part of a namespace so it will apply to all messages within that namespace (including nested).
Here is the example I often use:
Additionally I would recommend to read the manual. It provides a lot of explanation. For example you can read about Logger Hierarchy. Here is the quote from there:
and also: