diff options
| author | Rider Linden <rider@lindenlab.com> | 2017-01-25 11:13:59 -0800 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2017-01-25 11:13:59 -0800 |
| commit | 25cd2ed2052b0d30d61e8b81df151993983f561b (patch) | |
| tree | 7f9b29356b658303bdf7608a25ccb23c8e6130da /indra/llcommon/llerror.cpp | |
| parent | 8d86f5a0c457fceff5923fb7ca32259b2718addc (diff) | |
| parent | 68413474c4479eee9bdbeb34ea131475ba1d646e (diff) | |
Merge
Diffstat (limited to 'indra/llcommon/llerror.cpp')
| -rw-r--r-- | indra/llcommon/llerror.cpp | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 5ed348e13c..7887a942e9 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -921,11 +921,6 @@ namespace std::ostringstream message_stream; - if (show_location && (r->wantsLocation() || level == LLError::LEVEL_ERROR || s->mPrintLocation)) - { - message_stream << site.mLocationString << " "; - } - if (show_time && r->wantsTime() && s->mTimeFunction != NULL) { message_stream << s->mTimeFunction() << " "; @@ -933,17 +928,17 @@ namespace if (show_level && r->wantsLevel()) { - message_stream << site.mLevelString; + message_stream << site.mLevelString << " "; } if (show_tags && r->wantsTags()) { message_stream << site.mTagString; } - if ((show_level && r->wantsLevel())|| - (show_tags && r->wantsTags())) + + if (show_location && (r->wantsLocation() || level == LLError::LEVEL_ERROR || s->mPrintLocation)) { - message_stream << " "; + message_stream << site.mLocationString << " "; } if (show_function && r->wantsFunctionName()) @@ -1493,3 +1488,20 @@ 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 + { + return false; + } +} + + |
