llerror.cpp File Reference

error message system More...

#include "linden_common.h"
#include "llerror.h"
#include "llerrorcontrol.h"
#include <cctype>
#include <sstream>
#include <syslog.h>
#include <vector>
#include "llapp.h"
#include "llapr.h"
#include "llfile.h"
#include "llfixedbuffer.h"
#include "lllivefile.h"
#include "llsd.h"
#include "llsdserialize.h"
#include "llstl.h"

Include dependency graph for llerror.cpp:

Go to the source code of this file.

Namespaces

namespace  LLError

Classes

class  LLError::Settings

Typedefs

typedef std::map< std::string,
LLError::ELevel
LevelMap
typedef std::vector< LLError::Recorder * > Recorders
typedef std::vector< LLError::CallSite * > CallSiteVector

Functions

std::string className (const std::type_info &type)
std::string functionName (const std::string &preprocessor_name)
bool shouldLogToStderr ()
bool stderrLogWantsTime ()
void commonInit (const std::string &dir)
void LLError::initForServer (const std::string &identity)
void LLError::initForApplication (const std::string &dir)
void LLError::setPrintLocation (bool print)
void LLError::setFatalFunction (FatalFunction f)
void LLError::setTimeFunction (TimeFunction f)
void LLError::setDefaultLevel (ELevel level)
void LLError::setFunctionLevel (const std::string &function_name, ELevel level)
void LLError::setClassLevel (const std::string &class_name, ELevel level)
void LLError::setFileLevel (const std::string &file_name, ELevel level)
LLError::ELevel decodeLevel (std::string name)
void setLevels (LevelMap &map, const LLSD &list, LLError::ELevel level)
void LLError::configure (const LLSD &config)
void LLError::addRecorder (Recorder *recorder)
void LLError::removeRecorder (Recorder *recorder)
void LLError::logToFile (const std::string &file_name)
void LLError::logToFixedBuffer (LLFixedBuffer *fixedBuffer)
std::string LLError::logFileName ()
void writeToRecorders (LLError::ELevel level, const std::string &message)
bool checkLevelMap (const LevelMap &map, const std::string &key, LLError::ELevel &level)
Settings * LLError::saveAndResetSettings ()
void LLError::restoreSettings (Settings *s)
std::string LLError::removePrefix (std::string &s, const std::string &p)
void LLError::replaceChar (std::string &s, char old, char replacement)
std::string LLError::abbreviateFile (const std::string &filePath)
int LLError::shouldLogCallCount ()
void LLError::crashAndLoop (const std::string &message)
std::string LLError::utcTime ()

Variables

std::string mIdentity
llofstream mFile
bool mTimestamp
LLFixedBuffermBuffer
std::ostringstream messageStream
bool messageStreamInUse
CallSiteVector callSites
bool mLocked
bool mOK


Detailed Description

error message system

Date:
December 2006
LicenseInfo
firstyear=2006&license=viewergpl

Copyright (c) 2006-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llerror.cpp.


Typedef Documentation

typedef std::vector<LLError::CallSite*> CallSiteVector [static]

Definition at line 305 of file llerror.cpp.

typedef std::map<std::string, LLError::ELevel> LevelMap [static]

Definition at line 303 of file llerror.cpp.

typedef std::vector<LLError::Recorder*> Recorders [static]

Definition at line 304 of file llerror.cpp.


Function Documentation

bool @8::checkLevelMap ( const LevelMap map,
const std::string &  key,
LLError::ELevel level 
) [static]

Definition at line 803 of file llerror.cpp.

References i.

Referenced by LLError::Log::shouldLog().

std::string @4::className ( const std::type_info &  type  )  [static]

Definition at line 184 of file llerror.cpp.

References p.

Referenced by LLError::Log::flush(), and LLError::Log::shouldLog().

void @5::commonInit ( const std::string &  dir  )  [static]

Definition at line 496 of file llerror.cpp.

References LLError::addRecorder(), LLError::crashAndLoop(), e, LLError::LEVEL_INFO, LLError::Settings::reset(), LLError::setDefaultLevel(), LLError::setFatalFunction(), LLError::setTimeFunction(), shouldLogToStderr(), stderrLogWantsTime(), and LLError::utcTime().

Referenced by LLError::initForApplication(), and LLError::initForServer().

LLError::ELevel @6::decodeLevel ( std::string  name  )  [static]

Definition at line 590 of file llerror.cpp.

References i, LLError::LEVEL_ALL, LLError::LEVEL_DEBUG, LLError::LEVEL_ERROR, LLError::LEVEL_INFO, LLError::LEVEL_NONE, LLError::LEVEL_WARN, llendl, and llwarns.

Referenced by LLError::configure().

std::string @4::functionName ( const std::string &  preprocessor_name  )  [static]

Definition at line 224 of file llerror.cpp.

References p.

Referenced by LLError::Log::flush(), and LLError::Log::shouldLog().

void @6::setLevels ( LevelMap map,
const LLSD list,
LLError::ELevel  level 
) [static]

Definition at line 615 of file llerror.cpp.

References end, i, and list.

Referenced by LLError::configure().

bool @5::shouldLogToStderr (  )  [static]

Definition at line 470 of file llerror.cpp.

Referenced by commonInit().

bool @5::stderrLogWantsTime (  )  [static]

Definition at line 486 of file llerror.cpp.

Referenced by commonInit().

void @7::writeToRecorders ( LLError::ELevel  level,
const std::string &  message 
) [static]

Definition at line 744 of file llerror.cpp.

References LLError::Settings::get(), i, NULL, r, and s.

Referenced by LLError::Log::flush().


Variable Documentation

CallSiteVector callSites

Definition at line 320 of file llerror.cpp.

LLFixedBuffer& mBuffer

Definition at line 162 of file llerror.cpp.

Referenced by LLBufferStreamBuf::seekoff().

std::ostringstream messageStream

Definition at line 310 of file llerror.cpp.

bool messageStreamInUse

Definition at line 311 of file llerror.cpp.

llofstream mFile

Definition at line 129 of file llerror.cpp.

std::string mIdentity

Definition at line 95 of file llerror.cpp.

bool mLocked

Definition at line 823 of file llerror.cpp.

bool mOK

Definition at line 824 of file llerror.cpp.

bool mTimestamp

Definition at line 147 of file llerror.cpp.


Generated on Thu Jul 1 06:10:10 2010 for Second Life Viewer by  doxygen 1.4.7