You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2024/01/10 03:44:12 UTC
(logging-log4cxx) branch fix_cast_entries created (now 0099cc15)
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a change to branch fix_cast_entries
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
at 0099cc15 Allow use of log4cxx::cast with OnlyOnceErrorHandler, Hierarchy and PropertyConfigurator
This branch includes the following new commits:
new 0099cc15 Allow use of log4cxx::cast with OnlyOnceErrorHandler, Hierarchy and PropertyConfigurator
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(logging-log4cxx) 01/01: Allow use of log4cxx::cast with OnlyOnceErrorHandler, Hierarchy and PropertyConfigurator
Posted by sw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch fix_cast_entries
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 0099cc1594877cd2fbc2f793cf480cadcb2e0f58
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Wed Jan 10 14:43:55 2024 +1100
Allow use of log4cxx::cast with OnlyOnceErrorHandler, Hierarchy and PropertyConfigurator
---
src/main/include/log4cxx/helpers/onlyonceerrorhandler.h | 5 +++++
src/main/include/log4cxx/hierarchy.h | 5 +++++
src/main/include/log4cxx/propertyconfigurator.h | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h b/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h
index 0c7f7508..c0bde77b 100644
--- a/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h
+++ b/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h
@@ -45,8 +45,13 @@ class LOG4CXX_EXPORT OnlyOnceErrorHandler :
public:
DECLARE_LOG4CXX_OBJECT(OnlyOnceErrorHandler)
BEGIN_LOG4CXX_CAST_MAP()
+#if 15 < LOG4CXX_ABI_VERSION
+ LOG4CXX_CAST_ENTRY(OnlyOnceErrorHandler)
+ LOG4CXX_CAST_ENTRY_CHAIN(spi::ErrorHandler)
+#else
LOG4CXX_CAST_ENTRY(spi::OptionHandler)
LOG4CXX_CAST_ENTRY(spi::ErrorHandler)
+#endif
END_LOG4CXX_CAST_MAP()
OnlyOnceErrorHandler();
diff --git a/src/main/include/log4cxx/hierarchy.h b/src/main/include/log4cxx/hierarchy.h
index 38632304..8a913b2a 100644
--- a/src/main/include/log4cxx/hierarchy.h
+++ b/src/main/include/log4cxx/hierarchy.h
@@ -60,7 +60,12 @@ class LOG4CXX_EXPORT Hierarchy : public spi::LoggerRepository
public:
DECLARE_ABSTRACT_LOG4CXX_OBJECT(Hierarchy)
BEGIN_LOG4CXX_CAST_MAP()
+#if 15 < LOG4CXX_ABI_VERSION
+ LOG4CXX_CAST_ENTRY(Hierarchy)
+ LOG4CXX_CAST_ENTRY_CHAIN(spi::LoggerRepository)
+#else
LOG4CXX_CAST_ENTRY(spi::LoggerRepository)
+#endif
END_LOG4CXX_CAST_MAP()
private:
diff --git a/src/main/include/log4cxx/propertyconfigurator.h b/src/main/include/log4cxx/propertyconfigurator.h
index 59057fe8..b8d47db7 100644
--- a/src/main/include/log4cxx/propertyconfigurator.h
+++ b/src/main/include/log4cxx/propertyconfigurator.h
@@ -101,7 +101,12 @@ class LOG4CXX_EXPORT PropertyConfigurator :
public:
DECLARE_LOG4CXX_OBJECT(PropertyConfigurator)
BEGIN_LOG4CXX_CAST_MAP()
+#if 15 < LOG4CXX_ABI_VERSION
+ LOG4CXX_CAST_ENTRY(PropertyConfigurator)
+ LOG4CXX_CAST_ENTRY_CHAIN(spi::Configurator)
+#else
LOG4CXX_CAST_ENTRY(spi::Configurator)
+#endif
END_LOG4CXX_CAST_MAP()
PropertyConfigurator();