diff --git a/indra/llcommon/llinstancetracker.cpp b/indra/llcommon/llinstancetracker.cpp
index accb4286e89002d35a9332b1715d14ba2685df84..e7193b70b51949c67d3607ec92ad8c7092b3d3a7 100644
--- a/indra/llcommon/llinstancetracker.cpp
+++ b/indra/llcommon/llinstancetracker.cpp
@@ -27,12 +27,15 @@
 #include "linden_common.h"
 // associated header
 #include "llinstancetracker.h"
-#include "llapr.h"
-
+#include "llerror.h"
 // STL headers
 // std headers
 // external library headers
 // other Linden headers
 
-// This .cpp file is required by our CMake test macro. It contributes no code
-// to the viewer.
+void LLInstanceTrackerPrivate::logerrs(const char* cls, const std::string& arg1,
+                                       const std::string& arg2, const std::string& arg3)
+{
+    LL_ERRS("LLInstanceTracker") << LLError::Log::demangle(cls)
+                                 << arg1 << arg2 << arg3 << LL_ENDL;
+}
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
index cfb40c25f0fbad54e443cff3555fc90497f79ffa..196bc5c0ddd8b66d08761a01e983c2e78ec91489 100644
--- a/indra/llcommon/llinstancetracker.h
+++ b/indra/llcommon/llinstancetracker.h
@@ -42,18 +42,21 @@
 #include <boost/iterator/filter_iterator.hpp>
 
 #include "lockstatic.h"
+#include "stringize.h"
 
 /*****************************************************************************
 *   StaticBase
 *****************************************************************************/
-namespace LLInstanceTrackerStuff
+namespace LLInstanceTrackerPrivate
 {
     struct StaticBase
     {
         // We need to be able to lock static data while manipulating it.
         std::mutex mMutex;
     };
-} // namespace LLInstanceTrackerStuff
+
+    void logerrs(const char* cls, const std::string&, const std::string&, const std::string&);
+} // namespace LLInstanceTrackerPrivate
 
 /*****************************************************************************
 *   LLInstanceTracker with key
@@ -73,7 +76,7 @@ template<typename T, typename KEY = void,
 class LLInstanceTracker
 {
     typedef std::map<KEY, std::shared_ptr<T>> InstanceMap;
-    struct StaticData: public LLInstanceTrackerStuff::StaticBase
+    struct StaticData: public LLInstanceTrackerPrivate::StaticBase
     {
         InstanceMap mMap;
     };
@@ -232,7 +235,7 @@ class LLInstanceTracker
 
     // for logging
     template <typename K>
-    static K report(K key) { return key; }
+    static std::string report(K key) { return stringize(key); }
     static std::string report(const std::string& key) { return "'" + key + "'"; }
     static std::string report(const char* key) { return report(std::string(key)); }
 
@@ -249,8 +252,8 @@ class LLInstanceTracker
             auto pair = map.emplace(key, ptr);
             if (! pair.second)
             {
-                LL_ERRS("LLInstanceTracker") << "Instance with key " << report(key)
-                                             << " already exists!" << LL_ENDL;
+                LLInstanceTrackerPrivate::logerrs(typeid(*this).name(), " instance with key ",
+                                                  report(key), " already exists!");
             }
             break;
         }
@@ -299,7 +302,7 @@ template<typename T, EInstanceTrackerAllowKeyCollisions KEY_COLLISION_BEHAVIOR>
 class LLInstanceTracker<T, void, KEY_COLLISION_BEHAVIOR>
 {
     typedef std::set<std::shared_ptr<T>> InstanceSet;
-    struct StaticData: public LLInstanceTrackerStuff::StaticBase
+    struct StaticData: public LLInstanceTrackerPrivate::StaticBase
     {
         InstanceSet mSet;
     };