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/08/22 07:01:05 UTC

(logging-log4cxx) branch simplify_logging_event created (now d580add7)

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

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


      at d580add7 Simplify LoggingEvent creation

This branch includes the following new commits:

     new d580add7 Simplify LoggingEvent creation

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: Simplify LoggingEvent creation

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

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

commit d580add7848afd8383edbc6c97d6697f6e62909f
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Thu Aug 22 17:00:47 2024 +1000

    Simplify LoggingEvent creation
---
 src/main/cpp/loggingevent.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/cpp/loggingevent.cpp b/src/main/cpp/loggingevent.cpp
index a13fc661..b2cd50ba 100644
--- a/src/main/cpp/loggingevent.cpp
+++ b/src/main/cpp/loggingevent.cpp
@@ -38,7 +38,7 @@ using namespace LOG4CXX_NS::helpers;
 
 struct LoggingEvent::LoggingEventPrivate
 {
-	LoggingEventPrivate(const ThreadSpecificData::NamePairPtr& p = ThreadSpecificData::getCurrentData()->getNames()) :
+	LoggingEventPrivate(const ThreadSpecificData::NamePairPtr& p = ThreadSpecificData::getNames()) :
 		timeStamp(0),
 #if LOG4CXX_ABI_VERSION <= 15
 		threadName(p->idString),
@@ -53,7 +53,7 @@ struct LoggingEvent::LoggingEventPrivate
 		, const LevelPtr& level1
 		, const LocationInfo& locationInfo1
 		, LogString&& message1
-		, const ThreadSpecificData::NamePairPtr& p = ThreadSpecificData::getCurrentData()->getNames()
+		, const ThreadSpecificData::NamePairPtr& p = ThreadSpecificData::getNames()
 		) :
 		logger(logger1),
 		level(level1),
@@ -72,7 +72,7 @@ struct LoggingEvent::LoggingEventPrivate
 	LoggingEventPrivate(
 		const LogString& logger1, const LevelPtr& level1,
 		const LogString& message1, const LocationInfo& locationInfo1,
-		const ThreadSpecificData::NamePairPtr& p = ThreadSpecificData::getCurrentData()->getNames()
+		const ThreadSpecificData::NamePairPtr& p = ThreadSpecificData::getNames()
 		) :
 		logger(logger1),
 		level(level1),
@@ -243,7 +243,7 @@ LoggingEvent::KeySet LoggingEvent::getMDCKeySet() const
 		for (auto const& item : m_priv->dc->map)
 			result.push_back(item.first);
 	}
-	else for (auto const& item : ThreadSpecificData::getCurrentData()->getMap())
+	else for (auto const& item : ThreadSpecificData::getMap())
 		result.push_back(item.first);
 	return result;
 }