Thanks for the reply Charles.

It's a CentOS 5.4 system with Sun JDK 1.5 and tomcat-5.5.28 version. Tomcat
was not installed using CentOS package manager, but it is a core binary
package downloaded from tomcat project site.

I downloaded a fresh copy of tomcat package and took a diff of it against
tomcat in-use. Attached below is a snippet of it. On further digging around
I found following configuration related to logs:
 * $CATALINA_HOME/common/classes/log4j.properties: contains a line which is
spitting out logs to tomcat.log So I guess I am using log4j for internal
logging and they are going to tomcat.log file.
 * $CATALINA_HOME/conf/logging.properties


I don't see any configuration that specifies catalina.out. But the reason I
see logs in catalina.out are because of following reasons:
 ** Tomcat startup/shutdown information that goes to Stdout and Stderr
 ** My lazy programming practice: Not using log4j or any other logging API.

Am I understanding it correctly? Any thoughts?

Thanks,
jM.


Tomcat diff:
<pre>
diff -r --exclude=logs --exclude=webextapps --exclude=temp
./apache-tomcat-5.5.28/bin/catalina.sh
/home/testWbs/extapps/apache-tomcat-5.5.28/bin/catalina.sh
166c166
<   JAVA_OPTS="$JAVA_OPTS
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
---
>   JAVA_OPTS="$JAVA_OPTS
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server
-Xms128m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=256m"

Only in /home/testWbs/extapps/apache-tomcat-5.5.28/common/classes:
log4j.properties
Only in /home/testWbs/extapps/apache-tomcat-5.5.28/common/lib:
commons-logging-1.1.jar
Only in /home/testWbs/extapps/apache-tomcat-5.5.28/common/lib:
log4j-1.2.14.jar

diff -r --exclude=logs --exclude=webextapps --exclude=temp
./apache-tomcat-5.5.28/conf/logging.properties
/home/testWbs/extapps/apache-tomcat-5.5.28/conf/logging.properties
45c45,46
< java.util.logging.ConsoleHandler.level = FINE
---
> #java.util.logging.ConsoleHandler.level = FINE
> java.util.logging.ConsoleHandler.level = DEBUG

</pre>


On Thu, May 20, 2010 at 10:54 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Johan Martinez [mailto:jmart...@gmail.com]
> > Subject: newbie logging question: JULI or log4j or both?
> >
> > I am a developer and new to tomcat administration.
>
> Tomcat version?  JVM version?  Platform?
>
> (Always provide the basics when making inquiries.)
>
> > How do I find out if I am using JULI or log4j for logging?
>
> Tomcat logging and webapp logging are independent; you may well be using
> both, perhaps JULI for Tomcat and log4j for one or more webapps.  Where are
> the configuration files located?
>
> > Also, I see logs in catalina.out and tomcat.log.
>
> Standard, supported versions of Tomcat do not normally produce any file
> named "tomcat.log"; if you've got one, someone has fiddled with the default
> logging configuration, or you're running a 3rd-party repackaged version of
> Tomcat.
>
> The catalina.out file is usually just a redirection of stdout and stderr,
> and normally only appears on Linux/UNIX systems.  If webapps are writing to
> it, then the authors of the webapp were too lazy to utilize a proper logging
> mechanism.
>
> > I would like to customise it with DailyRollingFile, but I don't
> > see it mentioned anywhere.
>
> Look in the startup script you're using to get Tomcat running.
>
> You might want to read through the FAQ entries on logging:
> http://wiki.apache.org/tomcat/FAQ/Logging
>
>  - 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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to