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