Hi,
I found out that when calling 'removeAppender', log4cpp internally checks whether the category owns the appender. When does a category own an appender?
For example: if I create one appender object
log4cpp::RollingFileAppender* appender = new ....
and add this appender to many categories
category1.setAppender(appender);
category2.setAppender(appender);
category2.setAppender(appender);
.
.
.
which category actually owns the appender?
Furthermore, when calling 'removeAppender', and the category actually owns the appender, the appender object is actually deleted. What happens if I want to log using a different category which was assigned the same appender?
I know it is a bit too much to ask at once, but I am (extensively ) using log4cpp for logging in a (very) big project and now I am stuck because I am getting Segmentation faults whenever I call 'removeAppender'.
Can anyone help?
Thanx already ('in advance', that is).
lloyd
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I found out that when calling 'removeAppender', log4cpp internally checks whether the category owns the appender. When does a category own an appender?
For example: if I create one appender object
log4cpp::RollingFileAppender* appender = new ....
and add this appender to many categories
category1.setAppender(appender);
category2.setAppender(appender);
category2.setAppender(appender);
.
.
.
which category actually owns the appender?
Furthermore, when calling 'removeAppender', and the category actually owns the appender, the appender object is actually deleted. What happens if I want to log using a different category which was assigned the same appender?
I know it is a bit too much to ask at once, but I am (extensively ) using log4cpp for logging in a (very) big project and now I am stuck because I am getting Segmentation faults whenever I call 'removeAppender'.
Can anyone help?
Thanx already ('in advance', that is).
lloyd
Hi,
its me again. I am using version 0.3.1, by the way (because I need the RollingFileAppender).
lloyd