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/10/25 05:34:53 UTC

(logging-log4cxx) branch include_fmt_layout_in_static_library created (now b68a3c76)

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

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


      at b68a3c76 Allow for a FMT layout configuration when log4cxx is statically linked

This branch includes the following new commits:

     new b68a3c76 Allow for a FMT layout configuration when log4cxx is statically linked

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 for a FMT layout configuration when log4cxx is statically linked

Posted by sw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b68a3c7642fc5ed2c92d230aea3cb446132ba2ed
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Oct 25 16:34:34 2024 +1100

    Allow for a FMT layout configuration when log4cxx is statically linked
---
 src/main/cpp/class.cpp                | 6 ++++++
 src/main/include/CMakeLists.txt       | 6 ++++++
 src/main/include/log4cxx/log4cxx.h.in | 1 +
 3 files changed, 13 insertions(+)

diff --git a/src/main/cpp/class.cpp b/src/main/cpp/class.cpp
index f04c4ef2..0e6e6cf5 100644
--- a/src/main/cpp/class.cpp
+++ b/src/main/cpp/class.cpp
@@ -50,6 +50,9 @@
 #include <log4cxx/htmllayout.h>
 #include <log4cxx/simplelayout.h>
 #include <log4cxx/xml/xmllayout.h>
+#if LOG4CXX_HAS_FMT_LAYOUT
+#include <log4cxx/fmtlayout.h>
+#endif
 
 #include <log4cxx/filter/levelmatchfilter.h>
 #include <log4cxx/filter/levelrangefilter.h>
@@ -183,6 +186,9 @@ void Class::registerClasses()
 	SMTPAppender::registerClass();
 	JSONLayout::registerClass();
 	HTMLLayout::registerClass();
+#if LOG4CXX_HAS_FMT_LAYOUT
+	FMTLayout::registerClass();
+#endif
 	PatternLayout::registerClass();
 	SimpleLayout::registerClass();
 	XMLLayout::registerClass();
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 9eac0377..13dc5084 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -65,6 +65,12 @@ else()
     set(DOMCONFIGURATOR_SUPPORT 0)
 endif()
 
+if(ENABLE_FMT_LAYOUT)
+    set(FMT_LAYOUT_SUPPORT 1)
+else()
+    set(FMT_LAYOUT_SUPPORT 0)
+endif()
+
 option(LOG4CXX_MULTIPROCESS_ROLLING_FILE_APPENDER "Support multiple processes logging to the same file" OFF)
 if(LOG4CXX_MULTIPROCESS_ROLLING_FILE_APPENDER)
     set(MULTIPROCESS_RFA 1)
diff --git a/src/main/include/log4cxx/log4cxx.h.in b/src/main/include/log4cxx/log4cxx.h.in
index 28978edd..0de00ecc 100644
--- a/src/main/include/log4cxx/log4cxx.h.in
+++ b/src/main/include/log4cxx/log4cxx.h.in
@@ -53,6 +53,7 @@
 #define LOG4CXX_HAS_MULTIPROCESS_ROLLING_FILE_APPENDER @MULTIPROCESS_RFA@
 #define LOG4CXX_EVENTS_AT_EXIT @EVENTS_AT_EXIT@
 #define LOG4CXX_HAS_DOMCONFIGURATOR @DOMCONFIGURATOR_SUPPORT@
+#define LOG4CXX_HAS_FMT_LAYOUT @FMT_LAYOUT_SUPPORT@
 
 
 #define LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE 0