18 Sep 2010 19:34
Proper release of resources by AsyncAppender
Haider Ali <hali <at> quantitativebrokers.com>
2010-09-18 17:34:22 GMT
2010-09-18 17:34:22 GMT
Hi - I've tried to google for the documentation and the proper way to do this - however, haven't had much luck.
My setup is on REHL 5x using std gnu toolkit, etc. I can't seem to figure out how to properly release resources when using a AsyncAppender - I've tried the following calls on my destructors to shutdown the appenders/loggers:
LogManager::shutdown()
and
Logger::getRootLogger()->getLoggerRepository()->shutdown();
However, the threads started by the AsyncAppender are not released and the application just sits there.
(I have a shared library that utilizes log4cxx - that shared library is occasionally reloaded on-demand - this happens when the .so is reloaded and i try to cleanup resources being used by log4cxx manually; the standard FileAppender works fine)
Any suggestions/comments would be great.
Thanks
RSS Feed