This is an automated email from the ASF dual-hosted git repository.

swebb2066 pushed a commit to branch reduce_apr_influence
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit cd0d18e8cc9d76cfb66887c312b1a49e4b69f979
Author: Stephen Webb <[email protected]>
AuthorDate: Sun Nov 19 16:37:23 2023 +1100

    The FileWatchDog thread no longer uses APR threads
---
 src/examples/cpp/delayedloop.cpp      | 10 +---------
 src/main/cpp/propertyconfigurator.cpp |  3 ---
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/examples/cpp/delayedloop.cpp b/src/examples/cpp/delayedloop.cpp
index d1768135..1562d512 100644
--- a/src/examples/cpp/delayedloop.cpp
+++ b/src/examples/cpp/delayedloop.cpp
@@ -68,19 +68,11 @@ public:
                 if(configFile.length() > 4 &&
                      configFile.substr(configFile.length() - 4) == ".xml")
                 {
-#if APR_HAS_THREADS
-               xml::DOMConfigurator::configureAndWatch(configFile, 3000);
-#else
-               xml::DOMConfigurator::configure(configFile);
-#endif
+                        xml::DOMConfigurator::configureAndWatch(configFile, 
3000);
                 }
                 else
                 {
-#if APR_HAS_THREADS
                         PropertyConfigurator::configureAndWatch(configFile, 
3000);
-#else
-                        PropertyConfigurator::configure(configFile);
-#endif
                 }
         }
 
diff --git a/src/main/cpp/propertyconfigurator.cpp 
b/src/main/cpp/propertyconfigurator.cpp
index 3f037a35..2c54b4b8 100644
--- a/src/main/cpp/propertyconfigurator.cpp
+++ b/src/main/cpp/propertyconfigurator.cpp
@@ -49,7 +49,6 @@ using namespace LOG4CXX_NS::helpers;
 using namespace LOG4CXX_NS::config;
 using namespace LOG4CXX_NS::rolling;
 
-#if APR_HAS_THREADS
 #include <log4cxx/helpers/filewatchdog.h>
 namespace LOG4CXX_NS
 {
@@ -75,8 +74,6 @@ class PropertyWatchdog  : public FileWatchdog
 
 PropertyWatchdog* PropertyConfigurator::pdog = NULL;
 
-#endif
-
 IMPLEMENT_LOG4CXX_OBJECT(PropertyConfigurator)
 
 PropertyConfigurator::PropertyConfigurator()

Reply via email to