You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2007/02/02 22:52:17 UTC
svn commit: r502762 - in /logging/log4cxx/trunk: include/log4cxx/hierarchy.h
src/hierarchy.cpp
Author: carnold
Date: Fri Feb 2 13:52:16 2007
New Revision: 502762
URL: http://svn.apache.org/viewvc?view=rev&rev=502762
Log:
LOGCXX-161: Moved Pool and Mutex to eliminate destruct order problem
Modified:
logging/log4cxx/trunk/include/log4cxx/hierarchy.h
logging/log4cxx/trunk/src/hierarchy.cpp
Modified: logging/log4cxx/trunk/include/log4cxx/hierarchy.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/include/log4cxx/hierarchy.h?view=diff&rev=502762&r1=502761&r2=502762
==============================================================================
--- logging/log4cxx/trunk/include/log4cxx/hierarchy.h (original)
+++ logging/log4cxx/trunk/include/log4cxx/hierarchy.h Fri Feb 2 13:52:16 2007
@@ -64,6 +64,10 @@
public virtual helpers::ObjectImpl
{
private:
+ log4cxx::helpers::Pool pool;
+ log4cxx::helpers::Mutex mutex;
+ volatile log4cxx_uint32_t configured;
+
spi::LoggerFactoryPtr defaultFactory;
spi::HierarchyEventListenerList listeners;
@@ -276,9 +280,6 @@
Hierarchy& operator=(const Hierarchy&);
void updateChildren(ProvisionNode& pn, LoggerPtr logger);
- log4cxx::helpers::Pool pool;
- log4cxx::helpers::Mutex mutex;
- volatile log4cxx_uint32_t configured;
};
} //namespace log4cxx
Modified: logging/log4cxx/trunk/src/hierarchy.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/hierarchy.cpp?view=diff&rev=502762&r1=502761&r2=502762
==============================================================================
--- logging/log4cxx/trunk/src/hierarchy.cpp (original)
+++ logging/log4cxx/trunk/src/hierarchy.cpp Fri Feb 2 13:52:16 2007
@@ -42,10 +42,10 @@
IMPLEMENT_LOG4CXX_OBJECT(Hierarchy)
Hierarchy::Hierarchy() :
-thresholdInt(Level::ALL_INT), threshold(Level::getAll()),
-emittedNoAppenderWarning(false), emittedNoResourceBundleWarning(false),
pool(),
-mutex(pool), configured(false)
+mutex(pool), configured(false),
+thresholdInt(Level::ALL_INT), threshold(Level::getAll()),
+emittedNoAppenderWarning(false), emittedNoResourceBundleWarning(false)
{
root = new RootCategory(pool, Level::getDebug());
root->setHierarchy(this);