Thanks for your response.

I am using simplelog, not log4j.

Thank you.

 --- [EMAIL PROTECTED] wrote: 
> Your log4j configuration probably uses a
> consoleappender.
> Change this to be a fileappender instead, and you
> are done.
> 
> This document describes the configuration of log4j
> in short:
> http://logging.apache.org/log4j/docs/manual.html
> 
> To see what appenders are available in log4j, see
>
http://logging.apache.org/log4j/docs/api/org/apache/log4j/Appender.html
> and all implementing classes, especially
>
http://logging.apache.org/log4j/docs/api/org/apache/log4j/FileAppender.html
> 
> Hiran
> 
> 
> -----------------------------------------
> Hiran Chaudhuri
> SAG Systemhaus GmbH
> Elsenheimer Straße 11
> 80867 München
> Phone +49-89-54 74 21 34
> Fax   +49-89-54 74 21 99
> 
> 
>  
> 
> > -----Original Message-----
> > From: O. Oke [mailto:[EMAIL PROTECTED] 
> > Sent: Mittwoch, 6. Oktober 2004 14:09
> > To: Struts Users Mailing List
> > Subject: RE: How to configure Tomcat/Struts ...
> error 
> > messages are sent to a file, not the console?
> > 
> > Hi Hiran,
> > 
> > Thanks for your response.  I am using simplelog
> and it is 
> > already working.  The only problem is that the
> output is 
> > going to the console.  What I want is for the
> output to go 
> > into a file.  There is nothing in the
> configuration 
> > information that states how to redirect output to
> a file.
> > 
> > Please do you know how I can get the output to go
> into a file?
> > 
> > Thank you.
> > 
> > Ola
> > 
> > 
> > 
> >  --- [EMAIL PROTECTED] wrote: 
> > > Hi, O.
> > > 
> > > Check the configuration of the log facility
> actually in use 
> > > (commons-logging can use several).
> > > Most probably this is log4j. Then have a look at
> the log4j 
> > > configuration, which can be done with a
> log4j.properties file.
> > > Changes in this file and restarting your
> application should 
> > be all you 
> > > need.
> > > 
> > > Please have a look at the commons-logging and
> log4j 
> > documentation to 
> > > see how to configure your setup.
> > > 
> > > Hiran
> > > 
> > > -----------------------------------------
> > > Hiran Chaudhuri
> > > SAG Systemhaus GmbH
> > > Elsenheimer Straße 11
> > > 80867 München
> > > Phone +49-89-54 74 21 34
> > > Fax   +49-89-54 74 21 99
> > > 
> > > 
> > >  
> > > 
> > > > -----Original Message-----
> > > > From: O. Oke
> [mailto:[EMAIL PROTECTED]
> > > > Sent: Mittwoch, 6. Oktober 2004 13:11
> > > > To: Struts Users Mailing List
> > > > Subject: How to configure Tomcat/Struts ...
> error
> > > messages
> > > > are sent to a file, not the console?
> > > > 
> > > > Please tell me how to configure Tomcat/Struts
> so
> > > that error
> > > > messages are sent to a file, not the console? 
> > > > 
> > > > SERVER
> > > > ======
> > > > I am using tomcat-5.0.27
> > > > 
> > > > BACKGROUND
> > > > ==========
> > > > I am using  for logging error messages.  
> > > > 
> > > > The output of the code below goes to Eclipse
> > > console. 
> > > > What I want is for the output to go into a
> file.
> > > > 
> > > > import org.apache.commons.logging.Log; import 
> > > > org.apache.commons.logging.LogFactory;
> > > > 
> > > > 
> > > > public class CargoExceptionHandler extends
> > > ExceptionHandler {
> > > >    public ActionForward execute( Exception ex,
> > > >                               ExceptionConfig
> > > exConfig,
> > > >                               ActionMapping
> > > mapping,
> > > >                               ActionForm form,
> > > >                              
> HttpServletRequest
> > > request,
> > > >                              
> HttpServletResponse
> > > response
> > > >   ) throws ServletException{
> > > > 
> > > >           Log          log      =
> > > >
> LogFactory.getLog(CargoExceptionHandler.class);
> > > >           
> > > >           
> > > > 
> > > >          
> > > >                 //Which Logger is being Used?
> > > > 
> > > >                 System.out.println("The Log being
> used
> > > >>> " + log);
> > > > 
> > > >          
> > > > 
> > > >                 //Create a dummy exception to
> depict
> > > exception logging
> > > > 
> > > >                 Exception e = new Exception("A
> DUMMY
> > > EXCEPTION");
> > > > 
> > > >          
> > > > 
> > > >                 //Log TRACE if enabled
> > > > 
> > > >                 if (log.isTraceEnabled()) {
> > > > 
> > > >                     log.trace("TRACE TEST");
> > > > 
> > > >                     log.trace("TRACE TEST", e);
> > > > 
> > > >                 }
> > > > 
> > > >          
> > > > 
> > > >                 //Log DEBUG if enabled
> > > > 
> > > >                 if (log.isDebugEnabled()) {
> > > > 
> > > >                     log.debug("DEBUG TEST");
> > > > 
> > > >                     log.debug("DEBUG TEST", e);
> > > > 
> > > >                 }
> > > > 
> > > >          
> > > > 
> > > >                 //Log INFO if enabled
> > > > 
> > > >                 if (log.isInfoEnabled()) {
> > > > 
> > > >                     log.info("INFO TEST");
> > > > 
> > > >                     log.info("INFO TEST", e);
> > > > 
> > > >                 }
> > > > 
> > > >          
> > > > 
> > > >                 //Log WARN if enabled
> > > > 
> > > >                 if (log.isWarnEnabled()) {
> > > > 
> > > >                     log.warn("WARN TEST");
> > > > 
> > > >                     log.warn("WARN TEST", e);
> > > > 
> > > >                 }
> > > > 
> > > >          
> > > > 
> > > >                 //Log ERROR if enabled
> > > > 
> > > >                 if (log.isErrorEnabled()) {
> > > > 
> > > >                     log.error("ERROR TEST");
> > > > 
> > > >                     log.error("ERROR TEST", e);
> > > > 
> > > >                 }
> > > > 
> > > >          
> > > > 
> > > >                 //Log FATAL if enabled
> > > > 
> > > >                 if (log.isFatalEnabled()) {
> > > > 
> > > >                     log.fatal("FATAL TEST");
> > > > 
> > > >                     log.fatal("FATAL TEST", e);
> > > > 
> > > >                 }
> > > > 
> > > > 
> > > >         
> > > > }
> > > > 
> > > > Thank you.
> > > > 
> > > > 
> > > >         
> > > >         
> > > >                 
> > > >
> > >
> >
>
___________________________________________________________ALL
> > > > -NEW Yahoo! Messenger - all new features -
> even
> > > more fun!  
> > > > http://uk.messenger.yahoo.com
> > > > 
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > > 
> > > > 
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > >  
> > 
> > 
> >     
> >     
> >             
> >
>
___________________________________________________________ALL
> > -NEW Yahoo! Messenger - all new features - even
> more fun!  
> > http://uk.messenger.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>  


        
        
                
___________________________________________________________ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to