diff options
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r-- | indra/llcommon/llerror.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index c35799bbb9..9b0141eb76 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -534,7 +534,7 @@ namespace } - void commonInit(const std::string& dir) + void commonInit(const std::string& dir, bool log_to_stderr = true) { LLError::Settings::reset(); @@ -542,7 +542,8 @@ namespace LLError::setFatalFunction(LLError::crashAndLoop); LLError::setTimeFunction(LLError::utcTime); - if (shouldLogToStderr()) + // log_to_stderr is only false in the unit and integration tests to keep builds quieter + if (log_to_stderr && shouldLogToStderr()) { LLError::addRecorder(new RecordToStderr(stderrLogWantsTime())); } @@ -580,9 +581,9 @@ namespace LLError #endif } - void initForApplication(const std::string& dir) + void initForApplication(const std::string& dir, bool log_to_stderr) { - commonInit(dir); + commonInit(dir, log_to_stderr); } void setPrintLocation(bool print) @@ -617,6 +618,12 @@ namespace LLError s.defaultLevel = level; } + ELevel getDefaultLevel() + { + Settings& s = Settings::get(); + return s.defaultLevel; + } + void setFunctionLevel(const std::string& function_name, ELevel level) { Globals& g = Globals::get(); @@ -648,9 +655,7 @@ namespace LLError g.invalidateCallSites(); s.tagLevelMap[tag_name] = level; } -} -namespace { LLError::ELevel decodeLevel(std::string name) { static LevelMap level_names; @@ -675,7 +680,9 @@ namespace { return i->second; } - +} + +namespace { void setLevels(LevelMap& map, const LLSD& list, LLError::ELevel level) { LLSD::array_const_iterator i, end; |