You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2021/09/18 17:25:26 UTC
[logging-log4cxx] branch v0.12.x created (now d5af76d)
This is an automated email from the ASF dual-hosted git repository.
rmiddleton pushed a change to branch v0.12.x
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git.
at d5af76d LOGCXX-534 properly lock the mutex (#71)
This branch includes the following new commits:
new 8083aa0 Update copyright date
new 8326e72 LOGCXX-528 (#66)
new d4c33af Fix URL for log4j download
new cf6dcb3 Added output files from unit tests to ignore for cpack
new d5af76d LOGCXX-534 properly lock the mutex (#71)
The 5 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] 05/05: LOGCXX-534 properly lock the mutex (#71)
Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rmiddleton pushed a commit to branch v0.12.x
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit d5af76dc428372af6de9bfa94d1f71bd97d8b8cf
Author: Robert Middleton <rm...@users.noreply.github.com>
AuthorDate: Mon Sep 13 06:05:04 2021 -0700
LOGCXX-534 properly lock the mutex (#71)
---
src/main/cpp/appenderskeleton.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/cpp/appenderskeleton.cpp b/src/main/cpp/appenderskeleton.cpp
index 1fc2c96..6df2551 100644
--- a/src/main/cpp/appenderskeleton.cpp
+++ b/src/main/cpp/appenderskeleton.cpp
@@ -96,7 +96,7 @@ bool AppenderSkeleton::isAsSevereAsThreshold(const LevelPtr& level) const
void AppenderSkeleton::doAppend(const spi::LoggingEventPtr& event, Pool& pool1)
{
- log4cxx::shared_lock<log4cxx::shared_mutex> lock(mutex);
+ std::unique_lock<log4cxx::shared_mutex> lock(mutex);
doAppendImpl(event, pool1);
}
[logging-log4cxx] 01/05: Update copyright date
Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rmiddleton pushed a commit to branch v0.12.x
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 8083aa03364c7b3df7d18086716c290e8547b1aa
Author: Robert Middleton <rm...@users.noreply.github.com>
AuthorDate: Mon May 3 20:12:38 2021 -0400
Update copyright date
---
NOTICE | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NOTICE b/NOTICE
index 34791e6..56a71fe 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache log4cxx
-Copyright 2004-2007 The Apache Software Foundation
+Copyright 2004-2021 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
[logging-log4cxx] 02/05: LOGCXX-528 (#66)
Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rmiddleton pushed a commit to branch v0.12.x
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 8326e722c6a98ff28ceef5c3d55f5ede5be23b5c
Author: Robert Middleton <rm...@users.noreply.github.com>
AuthorDate: Thu Jul 22 15:27:50 2021 -0700
LOGCXX-528 (#66)
Fixes for checking that C++11 is available. Fix for older compilers.
---
CMakeLists.txt | 10 ++++++++++
src/cmake/boost-fallback/boost-fallback.cmake | 21 +++++++++++----------
src/main/cpp/hierarchy.cpp | 4 ++--
src/main/include/CMakeLists.txt | 2 +-
.../log4cxx/helpers/appenderattachableimpl.h | 1 +
src/main/include/log4cxx/helpers/aprinitializer.h | 1 +
src/main/include/log4cxx/helpers/loglog.h | 1 +
src/main/include/log4cxx/helpers/serversocket.h | 1 +
src/main/include/log4cxx/level.h | 1 +
src/main/include/log4cxx/rolling/action.h | 1 +
10 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5b44ef..9c6e639 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,9 @@ if( NOT "${CMAKE_CXX_STANDARD}")
set(CMAKE_CXX_STANDARD 17)
endif()
+# Don't allow for compiler-specific extensions
+set(CMAKE_CXX_EXTENSIONS OFF)
+
# Building
add_subdirectory(src)
@@ -186,6 +189,13 @@ if(APACHE_MAINTAINER)
endif()
#
+# Check for any fatal configuration errors
+#
+if( "${SHARED_MUTEX_IMPL}" STREQUAL "NONE" )
+ message( FATAL_ERROR "No shared_mutex implementation found. Requires Boost or C++17" )
+endif()
+
+#
# Output configuration information
# Similar to APR CMake configuration
#
diff --git a/src/cmake/boost-fallback/boost-fallback.cmake b/src/cmake/boost-fallback/boost-fallback.cmake
index a8d7d44..8285b0b 100644
--- a/src/cmake/boost-fallback/boost-fallback.cmake
+++ b/src/cmake/boost-fallback/boost-fallback.cmake
@@ -56,16 +56,17 @@ try_compile(STD_ATOMIC_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
"${CMAKE_CURRENT_LIST_DIR}/test-stdatomic.cpp")
find_package(Boost COMPONENTS thread)
-try_compile(Boost_SHARED_PTR_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
- "${CMAKE_CURRENT_LIST_DIR}/test-boostsharedptr.cpp")
-try_compile(Boost_MUTEX_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
- "${CMAKE_CURRENT_LIST_DIR}/test-boostmutex.cpp")
-try_compile(Boost_SHARED_MUTEX_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
- "${CMAKE_CURRENT_LIST_DIR}/test-boostsharedmutex.cpp"
- LINK_LIBRARIES Threads::Threads
-)
-try_compile(Boost_ATOMIC_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
- "${CMAKE_CURRENT_LIST_DIR}/test-boostatomic.cpp")
+if( ${Boost_FOUND} )
+ try_compile(Boost_SHARED_PTR_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
+ "${CMAKE_CURRENT_LIST_DIR}/test-boostsharedptr.cpp")
+ try_compile(Boost_MUTEX_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
+ "${CMAKE_CURRENT_LIST_DIR}/test-boostmutex.cpp")
+ try_compile(Boost_SHARED_MUTEX_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
+ "${CMAKE_CURRENT_LIST_DIR}/test-boostsharedmutex.cpp"
+ LINK_LIBRARIES Threads::Threads Boost::thread)
+ try_compile(Boost_ATOMIC_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
+ "${CMAKE_CURRENT_LIST_DIR}/test-boostatomic.cpp")
+endif( ${Boost_FOUND} )
# Link the target with the appropriate boost libraries(if required)
function(boostfallback_link target)
diff --git a/src/main/cpp/hierarchy.cpp b/src/main/cpp/hierarchy.cpp
index 4f51744..c70d39d 100644
--- a/src/main/cpp/hierarchy.cpp
+++ b/src/main/cpp/hierarchy.cpp
@@ -223,7 +223,7 @@ LoggerPtr Hierarchy::getLogger(const LogString& name,
else
{
LoggerPtr logger(factory->makeNewLoggerInstance(pool, name));
- logger->setHierarchy(weak_from_this());
+ logger->setHierarchy(shared_from_this());
loggers->insert(LoggerMap::value_type(name, logger));
ProvisionNodeMap::iterator it2 = provisionNodes->find(name);
@@ -423,6 +423,6 @@ void Hierarchy::configureRoot(){
// LOGCXX-322 we need to turn the repositroy into a weak_ptr, and we
// can't use weak_from_this() in the constructor.
if( !root->getLoggerRepository().lock() ){
- root->setHierarchy(weak_from_this());
+ root->setHierarchy(shared_from_this());
}
}
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 8183660..584941c 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -133,7 +133,7 @@ if( ${STD_SHARED_MUTEX_FOUND} )
elseif( ${Boost_SHARED_MUTEX_FOUND} )
set( SHARED_MUTEX_IMPL "boost::shared_mutex" )
else()
- set( SMART_PTR_IMPL "NONE" )
+ set( SHARED_MUTEX_IMPL "NONE" )
endif()
if( ${STD_ATOMIC_FOUND} )
diff --git a/src/main/include/log4cxx/helpers/appenderattachableimpl.h b/src/main/include/log4cxx/helpers/appenderattachableimpl.h
index 40e77d9..b80b5aa 100644
--- a/src/main/include/log4cxx/helpers/appenderattachableimpl.h
+++ b/src/main/include/log4cxx/helpers/appenderattachableimpl.h
@@ -28,6 +28,7 @@
#include <log4cxx/helpers/object.h>
#include <log4cxx/helpers/pool.h>
#include <log4cxx/log4cxx.h>
+#include <mutex>
namespace log4cxx
{
diff --git a/src/main/include/log4cxx/helpers/aprinitializer.h b/src/main/include/log4cxx/helpers/aprinitializer.h
index 6f3f550..fccd18e 100644
--- a/src/main/include/log4cxx/helpers/aprinitializer.h
+++ b/src/main/include/log4cxx/helpers/aprinitializer.h
@@ -30,6 +30,7 @@ extern "C" {
}
#include <apr_time.h>
+#include <mutex>
namespace log4cxx
{
diff --git a/src/main/include/log4cxx/helpers/loglog.h b/src/main/include/log4cxx/helpers/loglog.h
index d54785d..a4c9241 100644
--- a/src/main/include/log4cxx/helpers/loglog.h
+++ b/src/main/include/log4cxx/helpers/loglog.h
@@ -20,6 +20,7 @@
#include <log4cxx/logstring.h>
#include <exception>
+#include <mutex>
namespace log4cxx
{
diff --git a/src/main/include/log4cxx/helpers/serversocket.h b/src/main/include/log4cxx/helpers/serversocket.h
index e6e6d47..7da75b9 100644
--- a/src/main/include/log4cxx/helpers/serversocket.h
+++ b/src/main/include/log4cxx/helpers/serversocket.h
@@ -19,6 +19,7 @@
#define _LOG4CXX_HELPERS_SERVER_SOCKET_H
#include <log4cxx/helpers/socket.h>
+#include <mutex>
namespace log4cxx
{
diff --git a/src/main/include/log4cxx/level.h b/src/main/include/log4cxx/level.h
index 4ca4bf2..7848c90 100644
--- a/src/main/include/log4cxx/level.h
+++ b/src/main/include/log4cxx/level.h
@@ -22,6 +22,7 @@
#include <log4cxx/logstring.h>
#include <limits.h>
#include <log4cxx/helpers/object.h>
+#include <mutex>
#if defined(_MSC_VER)
#pragma warning ( push )
diff --git a/src/main/include/log4cxx/rolling/action.h b/src/main/include/log4cxx/rolling/action.h
index 0e8d55f..fc44978 100644
--- a/src/main/include/log4cxx/rolling/action.h
+++ b/src/main/include/log4cxx/rolling/action.h
@@ -21,6 +21,7 @@
#include <log4cxx/portability.h>
#include <log4cxx/helpers/object.h>
#include <log4cxx/helpers/pool.h>
+#include <mutex>
namespace log4cxx
{
[logging-log4cxx] 03/05: Fix URL for log4j download
Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rmiddleton pushed a commit to branch v0.12.x
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit d4c33af6c06aaa46a43046d14a08f0ccbf752f06
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Mon Aug 16 17:31:16 2021 -0400
Fix URL for log4j download
---
src/test/java/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/CMakeLists.txt b/src/test/java/CMakeLists.txt
index 0618241..6e8406c 100644
--- a/src/test/java/CMakeLists.txt
+++ b/src/test/java/CMakeLists.txt
@@ -1,6 +1,6 @@
include(FetchContent)
FetchContent_Declare(log4j
- URL https://www-us.apache.org/dist/logging/log4j/1.2.17/log4j-1.2.17.tar.gz
+ URL https://downloads.apache.org/logging/log4j/1.2.17/log4j-1.2.17.tar.gz
URL_HASH MD5=8218714e41ee0c6509dcfeafa2e1f53f
)
FetchContent_GetProperties(log4j)
[logging-log4cxx] 04/05: Added output files from unit tests to
ignore for cpack
Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rmiddleton pushed a commit to branch v0.12.x
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit cf6dcb3d028955bd397c03bf230cf1c1c8fad1d3
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Wed Sep 8 11:47:10 2021 -0400
Added output files from unit tests to ignore for cpack
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c6e639..ecd3f91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,7 +176,7 @@ option(APACHE_MAINTAINER "Apache maintainer" OFF)
if(APACHE_MAINTAINER)
set(CPACK_SOURCE_PACKAGE_FILE_NAME "apache-log4cxx-${LOG4CXX_RELEASE_VERSION}")
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
- set(CPACK_SOURCE_IGNORE_FILES ".git/;build/;.vs/;out/;CMakeLists.txt.user;src/main/abi-symbols/*")
+ set(CPACK_SOURCE_IGNORE_FILES ".git/;build/;.vs/;out/;CMakeLists.txt.user;src/main/abi-symbols/*;src/test/resources/output/")
include(CPack)
add_custom_target( dist