For a while we have been using
Log4CXX (somewhat) successfully in our project despite all its
shortcomings. Since we feel that the release of 0.9.8 is close, we have
started to port our codebase to the new version. Our program is a
server application running on the Windows platform. We are using the
Win32 src distribution obtained from http://littletux.homelinux.org/log4cxx/ on 16/05/2006. In our application we output some log data to the TelnetAppender and we were hit by an interesting bug during our testing. It appears that if you have a DOMConfigurator::configureAndWatch setup and your config file has a TelnetAppender, the initial configuration runs fine. However, if you change the file, when the platform tries to reload the config file the process stops before it can reinit the TelnetAppender. We have been able to trace the problem to the TelnetAppender::close() method which does a sh.stop(); on the handle which ultimately leads to the current running thread to exit because the underlying apr function calls _endthreadex(0). This stops all subsequent processing and even causes application instability. Moreover, if we skip over the sh.stop() call, then as soon as serverSocket->close() is called, we get an access violation due to an operation on the freed socket. It appears as if, the accept call should be somehow unblocked by the close method which should afterwards wait for the thread to join. Thanks for a great tool, Ufuk Kayserilioglu |
- TelnetAppender and Configuration Reload Ufuk Kayserilioglu
- TelnetAppender bug fix [was: TelnetAppender and Co... Ufuk Kayserilioglu