> From: Alexander Spitzer [mailto:[email protected]]
> Subject: How can I write a custom appender to supports Throwable as a second
> parameter?
>
> Is it possible to write a custom appender that can take an exception
> as a second parameter?
>
> I wrote a custom appender per the instructions on the log4j site which
> extends AppenderSkeleton.
>
> Later, I found out that some of the developers use logger.xxx(String,
> Throwable) instead of just the vanilla logger.xxx(String) call.
> Looking through AppenderSkeleton, it does not appear to have an
> overridable method for "Throwable" as the second parameter, and so my
> method for:
>
> protected void append(LoggingEvent event, Throwable exin)
>
> just gets ignored.

Alex,
You're confusing Appender methods with Logger methods!

Regards,
Michael Erskine.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to