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 "DeSantis, MJ Mark @ IS (7179)" <Ma...@L-3Com.com> on 2005/09/14 22:32:08 UTC

RE: JoranConfigurator and rollingPolicy, triggerPolicy, and filte r

Thanks for the reply Scott,

I, of course, breezed over the ImplicitAction class and did not grasp a good
knowledge of what it did. Thanks for pointing it out. I'll look into the
ChainsawAppender and see how that works for me. I might be back...

Thanks again for the suggestions. A+

Mark

-----Original Message-----
From: Scott Deboy [mailto:sdeboy@comotivsystems.com] 
Sent: Wednesday, September 14, 2005 11:49 AM
To: Log4J Users List
Subject: RE: JoranConfigurator and rollingPolicy, triggerPolicy, and filter


Ceki is the authority on this stuff.  See AndFilter for an example of
something that uses implicit actions (the tag names are the key, if I
recall).

Maybe you could use something like the generic 'ChainsawAppender', which
instantiates a 'viewerClass' and calls the 'activateViewer' method, from
which you could register it (or another class) as an appender through the
'setAppender' callback.

Scott
-----Original Message-----
From: DeSantis, MJ Mark @ IS (7179) [mailto:Mark.J.DeSantis@L-3Com.com] 
Sent: Wednesday, September 14, 2005 7:26 AM
To: 'log4j-user@logging.apache.org'
Subject: JoranConfigurator and rollingPolicy, triggerPolicy, and filter

Can anyone resolve my confusion?
 
The way I understand how the new joranconfigurator works is that there is an
actionclass associated with each tag in a log4j xml configuration file. How
then, if there is say a rolling file appender in the config file which has
the children rollingPolicy, triggerPolicy, and filter, does the
joranconfigurator act on these tags since there seems to be no actionclasses
for them in the org.apache.log4j.joran.action package. 
 
If I turn log4j internal degbugging on I notice that the joran goes through
and configures the appender using the
org.apache.log4j.joran.action.AppenderAction class but when it hits the
rollingPolicy triggerPolicy or filter tags it seems to pretty much skip them
but handles their param tags okay. And yet when I'm actually using the
appender, at least the filter works okay (I haven't actually tested to see
if it rolls or not).
 
Confusion abounds!
 
The main reason I ask is that I want to code a custom TableModelAppender and
have it be instantiated from the config file but I would like to have one of
its child param tags (or a custom tableModel tag) specify the tablemodel
class to append to. I would like to do this without having to write Action
classes for joran, and see that the rollingPolicy, triggerPolicy, and filter
seemed to be able to do this made me hopeful. Any suggestions would help
greatly.
 
Thanks.
 
Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org