This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a commit to branch remove_unused_private_data in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 5f6d0b8983c418d0601a1cc214fcca78d676d0e4 Author: Stephen Webb <[email protected]> AuthorDate: Thu Apr 3 16:17:33 2025 +1100 Remove unused member variables from private structs --- src/main/cpp/filewatchdog.cpp | 7 ----- src/main/cpp/loggingevent.cpp | 31 ---------------------- .../log4cxx/private/socketappenderskeleton_priv.h | 5 ---- 3 files changed, 43 deletions(-) diff --git a/src/main/cpp/filewatchdog.cpp b/src/main/cpp/filewatchdog.cpp index e7101bd4..2cd4c49f 100644 --- a/src/main/cpp/filewatchdog.cpp +++ b/src/main/cpp/filewatchdog.cpp @@ -51,13 +51,6 @@ struct FileWatchdog::FileWatchdogPrivate{ long delay; log4cxx_time_t lastModif; bool warnedAlready; -#if LOG4CXX_ABI_VERSION <= 15 - int interrupted{ 0 }; - Pool pool; - std::thread thread; - std::condition_variable interrupt; - std::mutex interrupt_mutex; -#endif LogString taskName; ThreadUtility::ManagerWeakPtr taskManager; }; diff --git a/src/main/cpp/loggingevent.cpp b/src/main/cpp/loggingevent.cpp index 8318a2e9..e1fc11f2 100644 --- a/src/main/cpp/loggingevent.cpp +++ b/src/main/cpp/loggingevent.cpp @@ -40,10 +40,6 @@ struct LoggingEvent::LoggingEventPrivate { LoggingEventPrivate(const ThreadSpecificData::NamePairPtr p = ThreadSpecificData::getNames()) : timeStamp(0), -#if LOG4CXX_ABI_VERSION <= 15 - threadName(p->idString), - threadUserName(p->threadName), -#endif pNames(p) { } @@ -60,10 +56,6 @@ struct LoggingEvent::LoggingEventPrivate message(std::move(message1)), timeStamp(Date::currentTime()), locationInfo(locationInfo1), -#if LOG4CXX_ABI_VERSION <= 15 - threadName(p->idString), - threadUserName(p->threadName), -#endif chronoTimeStamp(std::chrono::microseconds(timeStamp)), pNames(p) { @@ -79,10 +71,6 @@ struct LoggingEvent::LoggingEventPrivate message(message1), timeStamp(Date::currentTime()), locationInfo(locationInfo1), -#if LOG4CXX_ABI_VERSION <= 15 - threadName(p->idString), - threadUserName(p->threadName), -#endif chronoTimeStamp(std::chrono::microseconds(timeStamp)), pNames(p) { @@ -101,23 +89,11 @@ struct LoggingEvent::LoggingEventPrivate /** severity level of logging event. */ LevelPtr level; -#if LOG4CXX_ABI_VERSION <= 15 - mutable LogString* ndc{NULL}; - - mutable MDC::Map* mdcCopy{NULL}; -#endif - /** * A map of String keys and String values. */ std::map<LogString, LogString>* properties{NULL}; -#if LOG4CXX_ABI_VERSION <= 15 - mutable bool ndcLookupRequired{false}; - - mutable bool mdcCopyLookupRequired{false}; -#endif - /** The application supplied message. */ LogString message; @@ -130,13 +106,6 @@ struct LoggingEvent::LoggingEventPrivate /** The source code location where the logging request was made. */ const spi::LocationInfo locationInfo; - -#if LOG4CXX_ABI_VERSION <= 15 - const LogString& threadName; - - const LogString& threadUserName; -#endif - std::chrono::time_point<std::chrono::system_clock> chronoTimeStamp; /** diff --git a/src/main/include/log4cxx/private/socketappenderskeleton_priv.h b/src/main/include/log4cxx/private/socketappenderskeleton_priv.h index 9ed67f41..e4a3537d 100644 --- a/src/main/include/log4cxx/private/socketappenderskeleton_priv.h +++ b/src/main/include/log4cxx/private/socketappenderskeleton_priv.h @@ -72,11 +72,6 @@ struct SocketAppenderSkeleton::SocketAppenderSkeletonPriv : public AppenderSkele int port; int reconnectionDelay; bool locationInfo; -#if LOG4CXX_ABI_VERSION <= 15 - std::thread thread; - std::condition_variable interrupt; - std::mutex interrupt_mutex; -#endif void stopMonitor(); /**
