You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ali Mesbah <al...@West.NL> on 2002/02/04 17:49:11 UTC

appenders?

I have decided to use log4j in a project we are working on at WEST
consulting.

I have a question concerning the use of appenders in log4j.
The problem is as follows:
We would like to extend the functionality of our logging by writing a
new
appender which has a buffer in it for the log-messeges that are not
actually
logged but kept in this buffer for later use (fatal exceptions).
Whether a log-message is actually logged or kept in the buffer depends
on
its priority.
What I have seen from the hierarchy of the appenders in log4j is that it

is not possible to make a (appender) class which can take different
types of
appenders (fileAppender, RollingFileAppender,...) as parameter to
delegate to.
It is only possible to extend one of the appender classes at a time and
this
is a limitation which we do not want in our system.

The question is thus: is there a solution for the desired functionality
described above?

Yours sincerely,


-- Ali Mesbah - ali@west.nl - West Consulting B.V. --



Re: appenders?

Posted by Ceki Gülcü <ce...@qos.ch>.
Have you looked at the SMTPAppender? It's similar in functionality to
what you want to do. 

At 17:49 04.02.2002 +0100, you wrote:
>I have decided to use log4j in a project we are working on at WEST
>consulting.
>
>I have a question concerning the use of appenders in log4j.
>The problem is as follows:
>We would like to extend the functionality of our logging by writing a
>new
>appender which has a buffer in it for the log-messeges that are not
>actually
>logged but kept in this buffer for later use (fatal exceptions).
>Whether a log-message is actually logged or kept in the buffer depends
>on
>its priority.
>What I have seen from the hierarchy of the appenders in log4j is that it
>
>is not possible to make a (appender) class which can take different
>types of
>appenders (fileAppender, RollingFileAppender,...) as parameter to
>delegate to.
>It is only possible to extend one of the appender classes at a time and
>this
>is a limitation which we do not want in our system.
>
>The question is thus: is there a solution for the desired functionality
>described above?
>
>Yours sincerely,
>
>
>-- Ali Mesbah - ali@west.nl - West Consulting B.V. --

--
Ceki Gülcü



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>