You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jerald Powel <ge...@yahoo.co.uk> on 2003/09/10 08:56:50 UTC
TC logfiles
Hi,
I may have posted this previously, but dont think I was subscribed when I did! Enough of that..apologies if so.
I am trying to differentiate Apache and Apache Tomcat in terms of the serving mechanism, and subsequent log files. Of course, Apache is a web server, and Tomcat a servlet container, but Tomcat also is a/has a web server? If Tomcat contains a web server as a seperate entity, where can (if at all) the Apache httpd.conf file be found to configure such things as the log files produced?
This post relates to efforts to run Analog on multiple Tomcat log files (which it cannot currently recognize and discards).
What I am really trying to say is how do I configure logfile format for Tomcat?
Many thanks
Jerald.
---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
Re: TC logfiles
Posted by Jon Wingfield <jo...@mkodo.com>.
I assume you mean the access logs. Have a look at the contents of
<TOMCAT_HOME>/conf/server.xml and look for a Valve element for the
access logs. I'm fairly sure you can make the pattern the same as Analog
expects. Here's the reference for the Valve config:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/valve.html
HTH,
Jon
Jerald Powel wrote:
> Hi,
> I may have posted this previously, but dont think I was subscribed when I did! Enough of that..apologies if so.
> I am trying to differentiate Apache and Apache Tomcat in terms of the serving mechanism, and subsequent log files. Of course, Apache is a web server, and Tomcat a servlet container, but Tomcat also is a/has a web server? If Tomcat contains a web server as a seperate entity, where can (if at all) the Apache httpd.conf file be found to configure such things as the log files produced?
> This post relates to efforts to run Analog on multiple Tomcat log files (which it cannot currently recognize and discards).
>
> What I am really trying to say is how do I configure logfile format for Tomcat?
>
> Many thanks
>
> Jerald.
>
>
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
Re: TC logfiles
Posted by Tim Funk <fu...@joedog.org>.
You can pass in your own custom pattern to the access logs to get any format
you desire. The pattern syntax is modeled after the apache access log syntax.
You can also have as many access logs as you wish. You can have an access log
(or logs of different formats) at the engine, host level or the Context level.
-Tim
Andoni wrote:
> Hello,
>
> Tomcat is only configured through the server.xml file in
> <TOMCT_HOME>/conf/server.xml
>
> It is the configuration centre for the servlet container and the web-server
> aspects of Tomcat.
>
> If you choose not to use Apache as your front end and want to use Tomcat for
> this purpose then look in your default server.xml file (you should have a
> backup copy in /conf/ called server.xml.default) for a section like this:
>
> <!-- Access log processes all requests for this virtual host. By
> default, log files are created in the "logs" directory relative
> to
> $CATALINA_HOME. If you wish, you can specify a different
> directory with the "directory" attribute. Specify either a
> relative
> (to $CATALINA_HOME) or absolute path to the desired directory.
> -->
> <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs" prefix="localhost_access_log."
> suffix=".txt"
> pattern="common"/>
>
> It give you a valve that you can use to create access logs which will show
> each page access. But this is only necessary if you will not be using
> apache as your front end and that is not advisable. You cannot format these
> log files in the way you can format Apache's log files.
>
>
> Hope that helps,
> Andoni.
>
Re: TC logfiles
Posted by Andoni <an...@indigo.ie>.
Hello,
Tomcat is only configured through the server.xml file in
<TOMCT_HOME>/conf/server.xml
It is the configuration centre for the servlet container and the web-server
aspects of Tomcat.
If you choose not to use Apache as your front end and want to use Tomcat for
this purpose then look in your default server.xml file (you should have a
backup copy in /conf/ called server.xml.default) for a section like this:
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative
to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a
relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log."
suffix=".txt"
pattern="common"/>
It give you a valve that you can use to create access logs which will show
each page access. But this is only necessary if you will not be using
apache as your front end and that is not advisable. You cannot format these
log files in the way you can format Apache's log files.
Hope that helps,
Andoni.
----- Original Message -----
From: "Jerald Powel" <ge...@yahoo.co.uk>
To: <to...@jakarta.apache.org>
Sent: Wednesday, September 10, 2003 7:56 AM
Subject: TC logfiles
> Hi,
> I may have posted this previously, but dont think I was subscribed
when I did! Enough of that..apologies if so.
> I am trying to differentiate Apache and Apache Tomcat in terms
of the serving mechanism, and subsequent log files. Of course, Apache is a
web server, and Tomcat a servlet container, but Tomcat also is a/has a web
server? If Tomcat contains a web server as a seperate entity, where can (if
at all) the Apache httpd.conf file be found to configure such things as the
log files produced?
> This post relates to efforts to run Analog on multiple Tomcat log
files (which it cannot currently recognize and discards).
>
> What I am really trying to say is how do I configure logfile format for
Tomcat?
>
> Many thanks
>
> Jerald.
>
>
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE
Yahoo!Messenger