You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2011/07/29 18:14:11 UTC

Re: Missing files for Apache [Tomcat] and Log4J

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To whom it may concern,

On 7/29/2011 11:33 AM, A Df wrote:
> I have created a Java web application and I want to have logging to 
> ensure that the appropriate messages are stored in log files instead
> of to standard output.

Note that log4j is not necessary to do this. You only need log4j if you
want either prefer log4j in general, or want to use some of the logging
capabilities that JULI does not provide (e.g. syslog, etc.).

> I found a link at 
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html and was 
> following the instruction but I am unclear for these steps. My 
> details are:
> 
> * Apache Tomcat 6.0.26 * Log 4j 1.2.16
> 
> The instructions specify
> 
> * Build or download the additional logging components.
> 
> I am new to logging, so I am not sure what other extra are needed!

Re-read the page. There is a link to the "extras" component which
includes a section describing how you get the "extras" package.

> * Replace $CATALINA_HOME/bin/tomcat-juli.jar with
> output/extras/tomcat-juli.jar.
> 
> Does this mean that I move the jar from that location and create the 
> folders to put it in another location to have :C:\Program 
> Files\Apache Software Foundation\Apache Tomcat 6.0.26\output\extras?

No. It means take the file output/extras/tomcat-juli.jar and replace
$CATALINA_HOME/bin/tomcat-juli.jar, just like it says. You don't have to
create any directories or move anything anywhere.

> * Place output/extras/tomcat-juli-adapters.jar in 
> $CATALINA_HOME/lib.I cannot find the jar file in the Log4J download 
> or Apache files so where is it located?

The file in question does not come from log4j... it comes from the
Apache Tomcat "extras" package.See above: the "extras" package has
pretty clear download instructions.

> Is Log4J the best logging to use with a Java web app? Do you have
> any suggestions?

Log4j is one choice. Tomcat includes a fully capable logger that you can
use to write all your logs to files.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4y3FMACgkQ9CaO5/Lv0PApOQCgwzFC8fRfM3p6QBkPuo+eI4Pk
QVwAnArZrdU+TeGgJ9hklibDkG/7BCA3
=uNU4
-----END PGP SIGNATURE-----

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