You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@twill.apache.org by Bernd Fondermann <be...@gmail.com> on 2014/01/14 15:22:09 UTC

Subclassing PrinterLogHandler

Hi,

In order to quickly have a working LogHandler implementation, subclassing
PrinterLogHandler would have been great. However, this class is marked as
"final".
I suggest to un-finalize this class. WDYT?

   Bernd

Re: Subclassing PrinterLogHandler

Posted by Bernd Fondermann <be...@gmail.com>.
+1


On Tue, Jan 14, 2014 at 7:06 PM, Terence Yim <ch...@gmail.com> wrote:

> Hi Bernd,
>
> Currently the PrinterLogHandler is not really that useful for
> sub-classing, as the only thing you could do is to override the
> onLog() method, which is the only method in the LogHandler interface.
> But I do agree making having a base LogHandler (or turing
> PrinterLogHandler to that) is useful. E.g. we could have a predefined
> format() method for sub-class to override to alter log formatting.
> Thoughts?
>
> Terence
>
> On Tue, Jan 14, 2014 at 6:22 AM, Bernd Fondermann
> <be...@gmail.com> wrote:
> > Hi,
> >
> > In order to quickly have a working LogHandler implementation, subclassing
> > PrinterLogHandler would have been great. However, this class is marked as
> > "final".
> > I suggest to un-finalize this class. WDYT?
> >
> >    Bernd
>

Re: Subclassing PrinterLogHandler

Posted by Terence Yim <ch...@gmail.com>.
Hi Bernd,

Currently the PrinterLogHandler is not really that useful for
sub-classing, as the only thing you could do is to override the
onLog() method, which is the only method in the LogHandler interface.
But I do agree making having a base LogHandler (or turing
PrinterLogHandler to that) is useful. E.g. we could have a predefined
format() method for sub-class to override to alter log formatting.
Thoughts?

Terence

On Tue, Jan 14, 2014 at 6:22 AM, Bernd Fondermann
<be...@gmail.com> wrote:
> Hi,
>
> In order to quickly have a working LogHandler implementation, subclassing
> PrinterLogHandler would have been great. However, this class is marked as
> "final".
> I suggest to un-finalize this class. WDYT?
>
>    Bernd