summaryrefslogtreecommitdiff
path: root/indra/llcommon/llinitdestroyclass.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-08-30 16:28:21 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-08-30 16:28:21 -0400
commitdcdccb3ef1b42b36042fa6f3fe61849124e1728f (patch)
treed575f09660a55c40a23eec08af31a8191981bde2 /indra/llcommon/llinitdestroyclass.cpp
parente934e867bd76b7929b107a3174c35b00c21bac5f (diff)
MAINT-5232: Move "llerror.h" out of llcleanup.h, llinitdestroyclass.h
Introduce corresponding llcleanup.cpp, llinitdestroyclass.cpp modules to contain code that performs logging calls. Track class::method names for LLInitClass<T> and LLDestroyClass<T> subclasses, and log them when called. The order in which these calls occur could be relevant to bugs, and could surface the need to convert to LLSingleton dependencies.
Diffstat (limited to 'indra/llcommon/llinitdestroyclass.cpp')
-rw-r--r--indra/llcommon/llinitdestroyclass.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/llcommon/llinitdestroyclass.cpp b/indra/llcommon/llinitdestroyclass.cpp
new file mode 100644
index 0000000000..e6382a7924
--- /dev/null
+++ b/indra/llcommon/llinitdestroyclass.cpp
@@ -0,0 +1,30 @@
+/**
+ * @file llinitdestroyclass.cpp
+ * @author Nat Goodspeed
+ * @date 2016-08-30
+ * @brief Implementation for llinitdestroyclass.
+ *
+ * $LicenseInfo:firstyear=2016&license=viewerlgpl$
+ * Copyright (c) 2016, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llinitdestroyclass.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "llerror.h"
+
+void LLCallbackRegistry::fireCallbacks() const
+{
+ for (FuncList::const_iterator fi = mCallbacks.begin(), fe = mCallbacks.end();
+ fi != fe; ++fi)
+ {
+ LL_INFOS("LLInitDestroyClass") << "calling " << fi->first << "()" << LL_ENDL;
+ fi->second();
+ }
+}