tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Logging
Date Fri, 01 Mar 2002 19:53:13 GMT


On Fri, 1 Mar 2002, Jay Wright wrote:

>
> First - can the catalina.out file be configured through tomcat components
> such that all System.out and System.err entries are timestamped.
>

You can configure a <Logger> that uses the SystemOutLogger or
SystemErrLogger with timestamp="true", and anything logged there by Tomcat
(or your application calling the getServletContext().log() method) will be
timestamped.  However, this won't affect any output that is directly
written with things like System.out.println().

> Two - What are the api calls to write to the <logger> file and can I
> specifiy the verbosity (the level of the entry 0-4) with each entry?
>

>From within your application, anything you write via the
HttpServlet.log() or ServletContext.log() methods is written directly to
the <Logger> associated with your web application (with optional
timestamps if you have asked for it).  There is no provision through the
servlet API to set verbosity levels, however.

> I'm hesitant to use the <logger> since I'm unfamiliar with whether or not
> that code would be portable to other web servers?
>

Basic rule - *nothing* in server.xml is portable, but *everything* in your
own web.xml is portable.

> Thanks,
> Jay
>

Craig


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message