You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by johnrock <jo...@yahoo.com> on 2009/05/10 07:02:35 UTC

Is it possible to move Tomcat logfiles?

I am setting up a CentOS 5 server running tomcat and wanted to know whether
the best practice is to leave the Tomcat logfiles in their default location:

/usr/share/apache-tomcat-6.0.18/logs

or whether I should place them in another directory like /var/log/tomcat.

Is this possible, and/or preferred? 

I am new to Linux, but my understanding so far was that changing data like
logfiles should not be under /usr/ but instead under /var/.  Is that a
correct interpretation in this case?

Thanks
-- 
View this message in context: http://www.nabble.com/Is-it-possible-to-move-Tomcat-logfiles--tp23467178p23467178.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: Is it possible to move Tomcat logfiles?

Posted by Martin Gainty <mg...@hotmail.com>.
John

have you had a chance to look at
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
you can specify using either Log4J Logger or the Juli logger

Log4j specifies the Log File to append to as
log4j.appender.R.File=${catalina.home}/logs/tomcat.log 

the juli log folder is specified by
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

HTH
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: Sat, 9 May 2009 22:02:35 -0700
> From: johnpiser@yahoo.com
> To: users@tomcat.apache.org
> Subject: Is it possible to move Tomcat logfiles?
> 
> 
> I am setting up a CentOS 5 server running tomcat and wanted to know whether
> the best practice is to leave the Tomcat logfiles in their default location:
> 
> /usr/share/apache-tomcat-6.0.18/logs
> 
> or whether I should place them in another directory like /var/log/tomcat.
> 
> Is this possible, and/or preferred? 
> 
> I am new to Linux, but my understanding so far was that changing data like
> logfiles should not be under /usr/ but instead under /var/.  Is that a
> correct interpretation in this case?
> 
> Thanks
> -- 
> View this message in context: http://www.nabble.com/Is-it-possible-to-move-Tomcat-logfiles--tp23467178p23467178.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

Re: Is it possible to move Tomcat logfiles?

Posted by Jonathan Mast <jh...@gmail.com>.
Did CentOS setup /var and /usr on different partitions?  If so then maybe it
would be a good idea to place the logs some where on /var.

What else will this server be used for aside from the Webserver?  If nothing
else and if /var and /usr are on the same partition, then I wouldn't alter
the default locations of the tomcat folders.

On Sun, May 10, 2009 at 11:35 AM, Konstantin Kolinko <knst.kolinko@gmail.com
> wrote:

> 2009/5/10 johnrock <jo...@yahoo.com>:
> >
> > I am setting up a CentOS 5 server running tomcat and wanted to know
> whether
> > the best practice is to leave the Tomcat logfiles in their default
> location:
> >
> > /usr/share/apache-tomcat-6.0.18/logs
> >
> > or whether I should place them in another directory like /var/log/tomcat.
> >
> > Is this possible, and/or preferred?
> >
> > I am new to Linux, but my understanding so far was that changing data
> like
> > logfiles should not be under /usr/ but instead under /var/.  Is that a
> > correct interpretation in this case?
> >
> > Thanks
> > --
>
> 1. the log folder contains:
> 1) log output
>
> By default java.util.logging (aka JULI) is used to write those logs,
> though there is possibility to use log4j.
>
> It is configured as described in
>  http://tomcat.apache.org/tomcat-5.5-doc/logging.html
>
> For JULI the configuration file is logging.properties
>
> 2) catalina.out, that is redirected stdout, strerr of
> java process running the server
>
> Look into the shell script that starts Tomcat. That is where the
> redirection occurs.
>
> 2. I have configurations where log folder is stored in /var/log/... and the
> log folder of Tomcat is simply a symbolic link to that location.
>
> It works, and I think that would be one of the easiest ways to configure
> it.
>
> 3. If you are concerned about /usr vs. /var, you may want to pay attention
> to the possibility of separating CATALINA_HOME and CATALINA_BASE
>
> E.g., you may place conf, webapps, work etc. folders on /var, while bin,
> common, server remain on /usr.
>
> See RUNNING.txt in the distributive.
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Is it possible to move Tomcat logfiles?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/5/10 johnrock <jo...@yahoo.com>:
>
> I am setting up a CentOS 5 server running tomcat and wanted to know whether
> the best practice is to leave the Tomcat logfiles in their default location:
>
> /usr/share/apache-tomcat-6.0.18/logs
>
> or whether I should place them in another directory like /var/log/tomcat.
>
> Is this possible, and/or preferred?
>
> I am new to Linux, but my understanding so far was that changing data like
> logfiles should not be under /usr/ but instead under /var/.  Is that a
> correct interpretation in this case?
>
> Thanks
> --

1. the log folder contains:
1) log output

By default java.util.logging (aka JULI) is used to write those logs,
though there is possibility to use log4j.

It is configured as described in
 http://tomcat.apache.org/tomcat-5.5-doc/logging.html

For JULI the configuration file is logging.properties

2) catalina.out, that is redirected stdout, strerr of
java process running the server

Look into the shell script that starts Tomcat. That is where the
redirection occurs.

2. I have configurations where log folder is stored in /var/log/... and the
log folder of Tomcat is simply a symbolic link to that location.

It works, and I think that would be one of the easiest ways to configure it.

3. If you are concerned about /usr vs. /var, you may want to pay attention
to the possibility of separating CATALINA_HOME and CATALINA_BASE

E.g., you may place conf, webapps, work etc. folders on /var, while bin,
common, server remain on /usr.

See RUNNING.txt in the distributive.


Best regards,
Konstantin Kolinko

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