You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Hu <xw...@yahoo.com> on 2002/03/29 19:56:43 UTC

Re: Basic question about log4j

Thanks. I use watch dog now. but after I downloaded
log4j1.2, I could not see the architecture changes for
the watch dog, could you kindly point out?

--- Kevin Steppe <ks...@pacbell.net> wrote:
> 
> 
> Hu wrote:
> 
> > Hi, I am new to log4j. I have some basic questions
> > about log4j.
> > 1. In what kind of situation the constructor of
> > appenders that takes parameter will be called? if
> I
> > have my own appender that added more params,
> should I
> > creat the corresponding constructor?
> >
> 
> Since the configurator classes use the setXXX/getXXX
> methods, supply those and
> don't worry about the extra constructors.
> 
> >
> > 2. I use xml configuration file and use -D option
> to
> > specify the file, should it auto reload when the
> > confiration file changed? I can't get it work.
> >
> 
******************************************

> you need to use a 'configureAndWatch' method.  Look
> in the javadoc for the
> config class.
> Note that the configure and watch architecture is
> changing for log4j 1.2
> 
> >
> > 3. The message in LoggingEvent is private access,
> for
> > my situation, I need to put the timestamp in the
> > message and in the appender I need to access the
> > message to get the timestamp to create the file.
> And
> > remove the timestamp when the actual logging
> happens.
> > So is there any way to modify the message itself?
> >
> 
> The LoggingEvents automaticly get a timestamp
> attached.  Use a pattern layout
> object to pull that out, it's much less work than
> what you suggest.
> 
> Kevin
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>