[logback-dev] Layout setter/getter methods in AppenderBase

Ceki Gulcu ceki at qos.ch
Fri Feb 13 17:06:47 CET 2009


Maarten Bosteels wrote:
> 
>     interface LayoutAware extends Appender;
>     interface EncoderAware extends Appender;
> 
> 
> I don't understand.
> In my opinion LayoutAware and EncoderAware should be standalone 
> interface with just a getter and a setter, and not extend Appender.

Yes, obviously.

> All appenders that need a layout should implement LayoutAware.
> They can implement the interface themselves or - when its practical - 
> inherit from LayoutAwareAppenderBase

Agreed.

> Why would you tie LayoutAware to the Appender interface.

You could tie the two interfaces by mistake. :-)

> PS:  Not yet sure whether the encode method should return a byte[] or a 
> java.nio.ByteBuffer, I think the latter is easier to use.

That would would be an option to consider.

> regards,
> Maarten
-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the logback-dev mailing list