That is exactly what I was needing.  Just recoded to use it instead of
my other way... Perfect!

Thanks - I'll check the other appenders next question before posting!

Bill

-----Original Message-----
From: Jim Moore [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 08, 2003 7:48 PM
To: 'Log4J Developers List'
Subject: RE: Writing a new appender...


If you take a look at the source for some of the standard appenders
(like
FileAppender:
http://cvs.apache.org/viewcvs/jakarta-log4j/src/java/org/apache/log4j/Fi
leAp
pender.java?rev=1.35&content-type=text/vnd.viewcvs-markup ) you'll see
the
activateOptions() method.  As you can see in the FileAppender example,
it's exactly what you're looking for.

-Jim Moore


-----Original Message-----
From: Bill Chmura [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 08, 2003 7:39 PM
To: [EMAIL PROTECTED]
Subject: Writing a new appender...



I am writing a new appender and cannot really find any good
documentation on how to go about doing it.

I have something that does what I want it to do, but I have a few
questions:

(1) I have some properties that are optional.  I need to do some
initialization of the appender based on these.  I need to know when they
are set and when all of the properties have been set.  It would be great
if there was a call that was made when the appender was ready to go...
That way I could put it in there.  What I want to do is initialize a Que
with two different parameters.  I have both set up as set's in my
appender and that all works, but I need to know when I can create the
que if those values are not there.

It looks like it will not take appends until after the properties are
set, so I can check when the append is called, but then it will be
called for every log entry made thereafter.  I can have them without
defaults and insist the user have both entries and just check when they
are set...  

What is the best?





William B Chmura
Director of Internet Technology
Explosivo Internet Technology Group
http://www.Explosivo.com
Tel: (888) 560-YWEB

---------------------------------------------------------------------
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]

Reply via email to