You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Alexandre Gacon <al...@masagroup.net> on 2005/07/01 15:28:53 UTC

Developping a new Appender

Hello,

I would like to develop a new Appender to be able to send my log messages to
a Qt Widget.

After several tries, I can not find the way to do it such as it works.

First, I made my MyAppender class inherits from AppenderSkeleton. Is this
correct ?
I add the different macros I saw in the differente appender classes
(DECLARE_LOG4CXX_OBJECT, BEGIN_LOG4CXX_CAST_MAP, LOG4CXX_CAST_ENTRY...).
All compiles fine but when I try to execute my application, it crashes
during the init of the static object representing the class in
the log4cxx part.

So I tried to develop my class without using the macro. My application
crashes when I post an event : the MyAppender object I created and
I added to the root logger is invalid.

Does anyone have an idea ?

Alexandre Gacon