You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Holger Klawitter <li...@klawitter.de> on 2003/06/25 11:14:36 UTC
logging + tomcat (4.1.24,Linux)
Hi there,
since someone already suggested homicide on servlet developers writing to
stderr I tried to use (commons) logging in my webapps as suggest in the docs.
I have the following Logger Elements in my server.xml:
(under Service)
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
[this file is not even being created]
(under host)
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="logger." suffix=".log"
timestamp="true"/>
[only status messages go here, but no output from the webapp]
AFAICS, all logging systems (SUN, log4j and commons) have no connection to the
Tomcat logger elements. How can these Loggers be made interacting with Tomcat
logging?
Mit freundlichem Gruß / With kind regards
Holger Klawitter
--
lists <at> klawitter <dot> de
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: logging + tomcat (4.1.24,Linux)
Posted by Tim Funk <fu...@joedog.org>.
For me its the price of flexibility.
In log4j, it is easy to maintain the file name without making it an absolute
path. Log4j does allow property expansion (if thats the right term). For example:
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/output.log
-Tim
Holger Klawitter wrote:
> The problem is that now the tomcat admin has to maintain another config file
> containing the (same) paths to the logdir - I'd rather like to avoid that.
> Have you managed to avoid that?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: logging + tomcat (4.1.24,Linux)
Posted by Holger Klawitter <li...@klawitter.de>.
> So in my situation - I ignore the tomcat-loggers (almost), and use the
> config settings for my logging implementation (In particular, log4j).
The problem is that now the tomcat admin has to maintain another config file
containing the (same) paths to the logdir - I'd rather like to avoid that.
Have you managed to avoid that?
The tomcat logging is funny at that point indeed - the doc talks about how to
direct log messages, but no word about how to create them. ;-)
Mit freundlichem Gruß / With kind regards
Holger Klawitter
--
lists <at> klawitter <dot> de
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: logging + tomcat (4.1.24,Linux)
Posted by Tim Funk <fu...@joedog.org>.
When I use commons-logging - I ignore the loggers provided by tomcat. (Its
because I haven't read how to marry the two together) A problem of the tomcat
loggers is it is a boolean - you log or your don't. This is an issue when you
include many debug and trace calls. You don't want them logged unless you are
debugging. (But you also don't want to remove those statements either)
So in my situation - I ignore the tomcat-loggers (almost), and use the
config settings for my logging implementation (In particular, log4j).
Someday - I'll learn how to configure log4j to shove its log entries back
into the tomcat loggers and still get the flexibility to choose logging level
by package (or class)
-Tim (The homicidal developer/admin - who still has lots to learn)
Holger Klawitter wrote:
> Hi there,
>
> since someone already suggested homicide on servlet developers writing to
> stderr I tried to use (commons) logging in my webapps as suggest in the docs.
>
> I have the following Logger Elements in my server.xml:
>
> (under Service)
> <Logger className="org.apache.catalina.logger.FileLogger"
> prefix="catalina_log." suffix=".txt"
> timestamp="true"/>
> [this file is not even being created]
>
> (under host)
> <Logger className="org.apache.catalina.logger.FileLogger"
> directory="logs" prefix="logger." suffix=".log"
> timestamp="true"/>
> [only status messages go here, but no output from the webapp]
>
> AFAICS, all logging systems (SUN, log4j and commons) have no connection to the
> Tomcat logger elements. How can these Loggers be made interacting with Tomcat
> logging?
>
> Mit freundlichem Gruß / With kind regards
> Holger Klawitter
> --
> lists <at> klawitter <dot> de
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org