On Wed, 27 Feb 2002, Kranthi Meka wrote:

> Date: Wed, 27 Feb 2002 15:52:49 -0800
> From: Kranthi Meka <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: org.apache.catalina.logger.SystemOutLogger
>
> Hi,
>
> I am using Tomcat 4.0.
> How can I have a separate SystemOut log file for my application ?
> I do not want my system out to get dumped into the default catalina.out.
>
> I am using the below setting in my application context inside server.xml.
>
>         <!-- Tomcat EADMIN Context -->
>         <Context path="/eadmin" docBase="/usr/local/webapps/eadmin"
> debug="0"
>                  reloadable="true">
>           <Logger className="org.apache.catalina.logger.FileLogger"
>                      prefix="eadmin_file_log." suffix=".txt"
>                   timestamp="true"/>
>           <Logger className="org.apache.catalina.logger.SystemErrLogger"
>                      prefix="eadmin_syserr_log." suffix=".txt"
>                   timestamp="true"/>
>           <Logger className="org.apache.catalina.logger.SystemOutLogger"
>                      prefix="eadmin_sysout_log." suffix=".txt"
>                   timestamp="true"/>
>         </Context>
>
> FileLogger work fine, but SystemErrLogger, SystemOutLogger are not being
> generated.
> The Systemouts, errors are still going to catalina.out.
>

All of the output from SystemErrLogger and SystemOutLogger go to the
one-and-only System.err or System.out, so this is hardly surprising.  On
Unix systems, both of these streams are directed to System.out.

You can't have a per-webapp System.out because it is global to the entire
JVM.  However, you can certainly use a separate FileLogger for each
webapp, and use the ServletContext.log() method to write to it.

> Please help.
>
> Thanks,
> Kranthi.
>

Craig


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to