[logback-user] decorating an Appender with additional behavior ?

Ceki Gülcü ceki at qos.ch
Tue Feb 22 15:36:17 CET 2011


On 22/02/2011 2:21 PM, Andreas Andreakis wrote:
 > Is it possible to configure an Appender in XML, if it decorates
 > another ? Such that both appenders are configured declaratively. (I'm
 > thinking of a Spring beans like config, where one bean references
 > another) This would be especilly attractive in order to provide a
 > "generic" Decorator.

Sure.

 > A related question: In the case of XML configs, can one define how
 > the specified properties (sub-elements) are mapped to a class ?

Joran is extremely flexible. So, yes, it is possible.

 > As far as I can judge, it seems like the XML config assumes POJO
 > classes, where the properties map directly to POJO fields.

A field be an arbitrary class or even a list of arbitrary classes.
HTH,
--
Ceki


More information about the Logback-user mailing list