tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Honczar" <>
Subject need suggestion about jdk 1.4 logging in Tomcat
Date Fri, 03 Feb 2006 12:11:07 GMT


I need a suggestion about java logging within a context.
I´d like to have a way to isolate the jdk1.4 log between Tomcat contexts.

In my own lines of code, I create a JDK1.4 logger with an associated name, Handler and Formatter.
This way, I have one log file per context.
My problem is when I add Frameworks like Struts and Hibernate to my context. I would like
them logging into my current context log file.

Since they use commons logging, I´ve had to call LogManager.getLogManager().readConfiguration(InputStream
is); in order to make the logging engine load my configurations and let me log where I wish.
But that affects in a global way. If I have only one context running, everything is fine,
but with many, the last context that called readConfiguration redefines all the precedents.
I looked to the sources of the jdk and found it relies on the System Classloader...

I am a little bit trapped here, as I do not know how to redirect the log of the instances
of hibernate and struts to the log of my context of tomcat.

I appreciate very much any suggestions.

Alan Honczar


AVISO LEGAL - Esta mensagem e seu conteúdo - inclusive anexos - são para uso exclusivo de
seu(s) destinatário(s), podendo conter informações confidenciais e/ou legalmente privilegiadas
sobre a APPI Tecnologia S/A. Qualquer modificação, retransmissão, disseminação, impressão
ou utilização não autorizada fica estritamente proibida. Se você recebeu esta mensagem
por engano, por favor informe ao remetente e apague o material e as cópias de sua máquina.

LEGAL ADVICE - This message - including any attachments - contains confidential and privileged
information from APPI Tecnologia S/A intended for the named recipient(s) only. Any modification,
copying, printing or distribution of this message or the taking of any action based on it
is strictly prohibited. If you have received it by mistake please notify the sender by return
e-mail and delete this message from your system.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message