You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Milan Tomic <to...@yahoo.com> on 2009/11/20 12:26:28 UTC

Logging in Tomcat 5 (SysOut & SysErr)


At present, system.out and system.err are printing in the Windows console. How can I redirect output to some file? Or even better would be to have 2 outputs: file and Windows console. I have tried to read Tomcat docs and got lost there. It mentions default catalina.log as output, but I don't have it. Nor logging.properties.

Please, can someone give me short guide what I have to do to acomplish logging of system.err and system.out into the file(s)? I can not change the way applications log, apps log to system.out and doesn't use log4j.

Thank you,
Milan


      

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


RE: Logging in Tomcat 5 (SysOut & SysErr)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Milan Tomic [mailto:tomicmilan@yahoo.com]
> Subject: Logging in Tomcat 5 (SysOut & SysErr)
> 
> At present, system.out and system.err are printing in the Windows
> console. How can I redirect output to some file?

The first thing you have to tell us is exactly what version of Tomcat you're using; saying "Tomcat 5" is highly ambiguous.  If it's a 5.0.x, that is no longer supported.

Look at the swallowOutput attribute for the <Context> element:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

If you don't have a logging.properties file in Tomcat's conf directory, your Tomcat installation is corrupt.

 - 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


Re: Logging in Tomcat 5 (SysOut & SysErr)

Posted by Aleksandar Stoisavljevic <st...@gmail.com>.
You will need some kind of logging framework to do this (e.g. Log4J).

On Fri, Nov 20, 2009 at 12:26 PM, Milan Tomic <to...@yahoo.com> wrote:

>
>
> At present, system.out and system.err are printing in the Windows console.
> How can I redirect output to some file? Or even better would be to have 2
> outputs: file and Windows console. I have tried to read Tomcat docs and got
> lost there. It mentions default catalina.log as output, but I don't have it.
> Nor logging.properties.
>
> Please, can someone give me short guide what I have to do to acomplish
> logging of system.err and system.out into the file(s)? I can not change the
> way applications log, apps log to system.out and doesn't use log4j.
>
> Thank you,
> Milan
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Aleksandar dipl. ing. Stoisavljevic
Software Developer
mobile: +381 (0) 64 211 50 40
Web: http://www.staleksit.in.rs
E-mail:staleks@gmail.com <E-...@gmail.com>
Mail: Branislava Nusica 10, 21000 Novi Sad, Serbia