diff options
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rwxr-xr-x | indra/llcommon/llerror.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 96dbaa572a..a7963174ad 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -145,7 +145,7 @@ namespace { { mWantsTime = timestamp; } - + virtual void recordMessage(LLError::ELevel level, const std::string& message) { @@ -418,21 +418,21 @@ namespace LLError bool mPrintLocation; LLError::ELevel mDefaultLevel; - + LevelMap mFunctionLevelMap; LevelMap mClassLevelMap; LevelMap mFileLevelMap; LevelMap mTagLevelMap; std::map<std::string, unsigned int> mUniqueLogMessages; - + LLError::FatalFunction mCrashFunction; LLError::TimeFunction mTimeFunction; - + Recorders mRecorders; Recorder* mFileRecorder; Recorder* mFixedBufferRecorder; std::string mFileRecorderFileName; - + int mShouldLogCallCounter; static Settings& get(); @@ -450,12 +450,12 @@ namespace LLError mFileRecorder(NULL), mFixedBufferRecorder(NULL), mShouldLogCallCounter(0) - {} + { } ~Settings() { - for_each(mRecorders.begin(), mRecorders.end(), - DeletePointer()); + for_each(mRecorders.begin(), mRecorders.end(), DeletePointer()); + mRecorders.clear(); } static Settings*& getPtr(); @@ -806,7 +806,7 @@ namespace LLError {} Recorder::~Recorder() - {} + { } bool Recorder::wantsTime() { @@ -923,7 +923,7 @@ namespace ++i) { LLError::Recorder* r = *i; - + std::ostringstream message_stream; if (show_location && (r->wantsLocation() || level == LLError::LEVEL_ERROR || s.mPrintLocation)) @@ -937,10 +937,10 @@ namespace } if (show_level && r->wantsLevel()) - { + { message_stream << site.mLevelString << " "; - } - + } + if (show_tags && r->wantsTags()) { message_stream << site.mTagString << " "; @@ -969,7 +969,7 @@ namespace { return stop_checking = false; } - level = i->second; + level = i->second; return stop_checking = true; } @@ -998,7 +998,7 @@ namespace { } return found_level; } - + class LogLock { public: @@ -1064,7 +1064,7 @@ namespace LLError Settings& s = Settings::get(); s.mShouldLogCallCounter++; - + const std::string& class_name = className(site.mClassInfo); std::string function_name = functionName(site.mFunction); #if LL_LINUX @@ -1128,7 +1128,7 @@ namespace LLError else { strncpy(message, out->str().c_str(), 127); - message[127] = '\0'; + message[127] = '\0' ; } Globals& g = Globals::get(); @@ -1143,7 +1143,7 @@ namespace LLError { delete out; } - return; + return ; } void Log::flush(std::ostringstream* out, const CallSite& site) @@ -1175,7 +1175,7 @@ namespace LLError } std::ostringstream message_stream; - + if (site.mPrintOnce) { std::map<std::string, unsigned int>::iterator messageIter = s.mUniqueLogMessages.find(message); @@ -1237,7 +1237,7 @@ namespace LLError { std::string::size_type i = 0; std::string::size_type len = s.length(); - for (; i < len; i++ ) + for ( ; i < len; i++ ) { if (s[i] == old) { @@ -1308,8 +1308,8 @@ namespace LLError namespace LLError { - char** LLCallStacks::sBuffer = NULL; - S32 LLCallStacks::sIndex = 0; + char** LLCallStacks::sBuffer = NULL ; + S32 LLCallStacks::sIndex = 0 ; #define SINGLE_THREADED 1 @@ -1385,34 +1385,34 @@ namespace LLError if(!sBuffer) { - sBuffer = new char*[512]; - sBuffer[0] = new char[512 * 128]; - for(S32 i = 1; i < 512; i++) + sBuffer = new char*[512] ; + sBuffer[0] = new char[512 * 128] ; + for(S32 i = 1 ; i < 512 ; i++) { - sBuffer[i] = sBuffer[i-1] + 128; + sBuffer[i] = sBuffer[i-1] + 128 ; } - sIndex = 0; + sIndex = 0 ; } if(sIndex > 511) { - clear(); + clear() ; } - strcpy(sBuffer[sIndex], function); - sprintf(sBuffer[sIndex] + strlen(function), " line: %d ", line); - sIndex++; + strcpy(sBuffer[sIndex], function) ; + sprintf(sBuffer[sIndex] + strlen(function), " line: %d ", line) ; + sIndex++ ; - return; + return ; } //static std::ostringstream* LLCallStacks::insert(const char* function, const int line) { std::ostringstream* _out = LLError::Log::out(); - *_out << function << " line " << line << " "; + *_out << function << " line " << line << " " ; - return _out; + return _out ; } //static @@ -1426,21 +1426,21 @@ namespace LLError if(!sBuffer) { - sBuffer = new char*[512]; - sBuffer[0] = new char[512 * 128]; - for(S32 i = 1; i < 512; i++) + sBuffer = new char*[512] ; + sBuffer[0] = new char[512 * 128] ; + for(S32 i = 1 ; i < 512 ; i++) { - sBuffer[i] = sBuffer[i-1] + 128; + sBuffer[i] = sBuffer[i-1] + 128 ; } - sIndex = 0; + sIndex = 0 ; } if(sIndex > 511) { - clear(); + clear() ; } - LLError::Log::flush(_out, sBuffer[sIndex++]); + LLError::Log::flush(_out, sBuffer[sIndex++]) ; } //static @@ -1457,7 +1457,7 @@ namespace LLError LL_INFOS() << " ************* PRINT OUT LL CALL STACKS ************* " << LL_ENDL; while(sIndex > 0) { - sIndex--; + sIndex-- ; LL_INFOS() << sBuffer[sIndex] << LL_ENDL; } LL_INFOS() << " *************** END OF LL CALL STACKS *************** " << LL_ENDL; @@ -1465,16 +1465,16 @@ namespace LLError if(sBuffer) { - delete[] sBuffer[0]; - delete[] sBuffer; - sBuffer = NULL; + delete[] sBuffer[0] ; + delete[] sBuffer ; + sBuffer = NULL ; } } //static void LLCallStacks::clear() { - sIndex = 0; + sIndex = 0 ; } } |