logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject RE: sub-compoent configuration (was RE: JDBC Appender)
Date Tue, 01 Apr 2003 17:27:09 GMT
At 09:09 AM 4/1/2003 -0800, you wrote:
> > In log4j version 1.3, you can also include sub-components in
> > config files
> > written in XML. Seeing a sub-element within an appender element,
> > DOMConfigurator will automatically instantiate and configure the
> > sub-element. I'll write complete example within the next few
> > days. If I
> > forget, please do not hesitate to remind me.
>
>Ceki,
>
>That is very cool.  Definitely want to start taking advantage of that.  Has
>this replaced the new xml configurator you were thinking of?

Thanks Mark. I sent an example for sub-component configuration earlier this 
morning. Please see 
http://marc.theaimsgroup.com/?l=log4j-dev&m=104920391224680&w=2 if you have 
not already.

The DOMConfigurator as it exists in the CVS repository is enhanced with 
respect to what is available in log4j 1.2. In particular, it can 
automatically handle sub-elements, or sub-elements of sub-elements (i.e. it 
is recursive). It can also handle multiple sub-elements of the same type, 
such as filters. You can for example write:

  <appender name="FOO" ...>
     <x ...>
       <y .../>
     </x>
     <x .../>
  </appender>

It will instantiate and configure to x's (whatever they may be) and add 
them to appender FOO.
This already grants us a good deal of flexibility. However, one can still 
not change the way config files are parsed. The next step is to allow the 
Configurator to be able to learn new parsing rules at run time. However, 
this requires a substantial if not complete re-write of DOMConfigurator 
such that a new name is warranted. Anyway, this is something I wanted to do 
for a long time. Unfortunately, I am still bogged down with administrative 
crap. I hope to be done by tomorrow or Thursday at the latest.


>-Mark

--
Ceki 


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


Mime
View raw message