summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-11 13:55:34 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-11 13:55:34 +0100
commit887638c4d274d067f44d97128b34fde837ab69a9 (patch)
treeb671f8530e7a242a958a4bb5525bf84277e5f1da /indra/llcommon
parent68621905004bd783386d37b2d5d4265494ec4c18 (diff)
SL-915 - fix for crash when logcontrol file reloaded
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llerror.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 916555a71d..f81030b0e7 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -29,6 +29,7 @@
#include "llerror.h"
#include "llerrorcontrol.h"
+#include "llsdutil.h"
#include <cctype>
#ifdef __GNUC__
@@ -51,10 +52,6 @@
#include "llstl.h"
#include "lltimer.h"
-//#if LL_WINDOWS
-//#pragma optimize("", off)
-//#endif
-
namespace {
#if LL_WINDOWS
void debugger_print(const std::string& s)
@@ -365,7 +362,6 @@ namespace
}
}
- LL_INFOS("LogControlFile") << "logging reconfiguring from " << filename() << LL_ENDL;
LLError::configure(configuration);
LL_INFOS("LogControlFile") << "logging reconfigured from " << filename() << LL_ENDL;
return true;
@@ -408,7 +404,7 @@ namespace
i != callSites.end();
++i)
{
- (*i)->invalidate();
+ (*i)->invalidate();
}
callSites.clear();
@@ -1523,18 +1519,16 @@ namespace LLError
bool debugLoggingEnabled(const std::string& tag)
{
- const char* tags[] = {tag.c_str()};
- ::size_t tag_count = 1;
- LLError::CallSite _site(LLError::LEVEL_DEBUG, __FILE__, __LINE__,
- typeid(_LL_CLASS_TO_LOG), __FUNCTION__, false, tags, tag_count);
- if (LL_UNLIKELY(_site.shouldLog()))
- {
- return true;
- }
- else
+ LogLock lock;
+ if (!lock.ok())
{
return false;
}
+
+ LLError::SettingsConfigPtr s = LLError::Settings::getInstance()->getSettingsConfig();
+ LLError::ELevel level = LLError::LEVEL_DEBUG;
+ bool res = checkLevelMap(s->mTagLevelMap, tag, level);
+ return res;
}