> 
> ali navadeh wrote:
> > users-unsubscr...@tomcat.apache.org
> > 
> > On 4/21/09, gaganjoshi007 <gagan.joshi...@gmail.com> wrote:
> >> Hi
> >> I am having multiple project on tomcat server.
> >> I get output and error logged in stdout file.
> >> but when error logs in stdout file it done not get the output date an d
> >> time.
> >>
> >> I like stdout log the error with date and time and the application name
> >> before logging the error.
> >> like
> >> [application name] [datetime]
> >> [output]
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
states you can supplt those parameters thru
%TOMCAT_HOME%/lib/log4j.properties log4j.appender.R.layout.ConversionPattern
e.g.
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG,
 R
log4j.logger.org.apache.catalina.core=DEBUG, R
log4j.logger.org.apache.catalina.session=DEBUG, R
log4j.rootLogger=debug, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log

log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%m%d
log4j.logger.org.apache.catalina=DEBUG, R

p=Used to output the priority of the logging event.
t=Used to output the name of the thread that generated the
     logging event.
c=Used to output the category of the logging event. The
     category conversion specifier can be optionally followed by
     precision specifier, that is a decimal constant in
     brackets.

     
m=Used to output the application supplied message associated with
     the logging event.
n=Outputs the platform dependent line separator character or
     characters.

     
d=Used to output the date of
         the logging event. The date conversion specifier may be
         followed by a date format specifier enclosed between
         braces. For example, %d{HH:mm:ss,SSS} or
         %d{dd MMM yyyy HH:mm:ss,SSS}.  If no
         date format specifier is given then ISO8601 format is
         assumed.

> >> this will help me to find out which application is throwing error
> >>
> >> can anybody help me.
> >>
> >> Thanks
> >> Gagan
> >> --
> >> View this message in context:
> >> http://www.nabble.com/datetime-missing-in-stdout-log-file-tp23152287p23152287.html
> >> Sent from the Tomcat - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_________________________________________________________________
Windows Live™ Hotmail®:…more than just e-mail.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009

Reply via email to