You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Laura Bartolomé <la...@secways.com> on 2009/04/03 10:57:25 UTC

date and time in log

just a little question...

when tomcat write errors in stdout it doesn't write date and time...
well we are interesting in time of each error... how can we enabled
this?? it could be??

Thanks...

Laura

PD: W2003 Server + Tomcat 6 + java 1.5.7  :)


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


RE: date and time in log

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Laura Bartolomé [mailto:laura@secways.com]
> Subject: date and time in log
> 
> when tomcat write errors in stdout it doesn't write date and time...

Tomcat does not write to System.out or System.err (other than some esoteric debugging stuff).  The default logging configuration does write to the console, but that always includes the date and time, unless you've changed the formatter configuration in conf/logging.properties.

If your webapps, are writing to System.out or System.err, that's poor practice - you should be using a logging system.  If you want Tomcat to intercept and redirect this bad practice, set swallowOutput to true in the <Context> elements of interest (or in the global conf/context.xml file).

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org