change the pattern layout strings for the output appender to log the full 
class name: I suspect the appender has a format like %c{1}; if you change 
that to just %c you should get the entire class....
■ DOUGLAS E. WEGSCHEID // Lead Analyst, Directories
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played 
with conviction is interpretation."



Alain Désilets <alaindesile...@gmail.com> 
10/30/2013 12:25 PM
Please respond to
"Log4J Users List" <log4j-user@logging.apache.org>


To
log4j-user@logging.apache.org
cc

Subject
How to tell which logger to disable






This must be a really basic question, but I can't find the answer 
anywhere.

I have a servlet, and whenever I run it, I get log4j messages that look
like this:

---
2013-10-30 11:47:57 ERROR jericho:? - Child Element <script >-</script>
((r4965,c1,p137917)-(r5003,c10,p139558)) extends beyond end of parent
Element <div >-</div> ((r4784,c1,p99808)-(r4971,c15,p138324))
---

I want to disable those message.

My question is this: "Can I tell from the above message, what name to use
to access the logger I want to disable?"

From the message, it looks like 'jericho' is part of the name, but I
presume it's not the complete name. Indeed, if I write this in the
constructor of my servlet, I still get the log messages:

        Logger.getLogger("jericho").setLevel(Level.OFF);

By looking around my code, I guessed that the log messages were probably
created by a third party class net.htmlparser.jericho that I use. And
indeed, I was able to disable the message as follows:

        Logger.getLogger("net.htmlparser.jericho").setLevel(Level.OFF);

In this case, it was pretty easy, because jericho is a pretty distinctive
class name. But sometimes I see messages where the name of the class is
something more generic like "Client". In a situation like this, how do I
know which package the class is in?

Thx.

Alain Désilets


Reply via email to