diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-05-03 09:55:31 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-05-03 09:55:31 -0400 |
commit | 2a10bd406c9155d30a82657ce2ee532b3a677d83 (patch) | |
tree | 0d5094583c60c4d57b52532f0407b09523d8d79f /indra/llcommon/llerror.cpp | |
parent | 2994833e7cc53670bd3303cb88054d7acee875cf (diff) |
DRTVWR-559: Replace debugLoggingEnabled() function with LL_DEBUGS().
The trouble with debugLoggingEnabled() is that it locked mutexes and searched
maps every time that call was reached. LL_DEBUGS() has the same functionality
(albeit with idiosyncratic syntax) but performs expensive lookups only once
per session, caching the result in a local static variable.
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r-- | indra/llcommon/llerror.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 56fb7c21ca..5aa8558878 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1609,19 +1609,5 @@ namespace LLError } } -bool debugLoggingEnabled(const std::string& tag) -{ - LLMutexTrylock lock(getMutex<LOG_MUTEX>(), 5); - if (!lock.isLocked()) - { - return false; - } - - SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig(); - LLError::ELevel level = LLError::LEVEL_DEBUG; - bool res = checkLevelMap(s->mTagLevelMap, tag, level); - return res; -} - |