You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by bmelloni <Br...@chickasaw.net> on 2009/05/05 18:44:36 UTC

default log4j.xml for apps

Although we use jBoss for our servers, I use Tomcat for development because
of its much faster restart and better integration with Eclipse.  The
applications reuse certain components heavily and thus rely on the presence
of a central log4j.xml to control the logging level for those components
(which in jBoss' case is jBoss' jboss-logj.xml).

And here comes my problem.  I don't particularly care if Tomcat logging
continues using its current approach, since it is already fairly silent. 
But I have to have a central log4j.xml available with default logging
configuration for all of the apps.  How can I do this in Tomcat?
-- 
View this message in context: http://www.nabble.com/default-log4j.xml-for-apps-tp23391412p23391412.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: default log4j.xml for apps

Posted by bmelloni <Br...@chickasaw.net>.

Caldarale, Charles R wrote:
> 
> You didn't bother to tell us what version of Tomcat you're using, but for
> 6.0.x try putting the log4j.xml file in Tomcat's lib directory. 

Sorry, it is Tomcat 6.0.18, and I had log4j.xml present in the conf folder. 
Once I moved it to lib, it started getting used for the apps.

Thanks.
-- 
View this message in context: http://www.nabble.com/default-log4j.xml-for-apps-tp23391412p23393856.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: default log4j.xml for apps

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: bmelloni [mailto:Bruno.Melloni@chickasaw.net]
> Subject: default log4j.xml for apps
> 
> But I have to have a central log4j.xml available with default logging
> configuration for all of the apps.  How can I do this in Tomcat?

You didn't bother to tell us what version of Tomcat you're using, but for 6.0.x try putting the log4j.xml file in Tomcat's lib directory.  For older versions, try shared/lib.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: default log4j.xml for apps

Posted by Martin Gainty <mg...@hotmail.com>.
start by configuring $CATALINA_HOME/lib/log4j.properties e.g.
    log4j.rootLogger=debug, R 
    log4j.appender.R=org.apache.log4j.RollingFileAppender 
    log4j.appender.R.File=${catalina.home}/logs/tomcat.log 
    log4j.appender.R.MaxFileSize=10MB 
    log4j.appender.R.MaxBackupIndex=10 
    log4j.appender.R.layout=org.apache.log4j.PatternLayout 
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 
    log4j.logger.org.apache.catalina=DEBUG, R
http://www.mbaworld.com/docs/logging.html

Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Tue, 5 May 2009 09:44:36 -0700
> From: Bruno.Melloni@chickasaw.net
> To: users@tomcat.apache.org
> Subject: default log4j.xml for apps
> 
> 
> Although we use jBoss for our servers, I use Tomcat for development because
> of its much faster restart and better integration with Eclipse.  The
> applications reuse certain components heavily and thus rely on the presence
> of a central log4j.xml to control the logging level for those components
> (which in jBoss' case is jBoss' jboss-logj.xml).
> 
> And here comes my problem.  I don't particularly care if Tomcat logging
> continues using its current approach, since it is already fairly silent. 
> But I have to have a central log4j.xml available with default logging
> configuration for all of the apps.  How can I do this in Tomcat?
> -- 
> View this message in context: http://www.nabble.com/default-log4j.xml-for-apps-tp23391412p23391412.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009