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 <unistd.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)
void LLError::setTagLevel (const std::string &tag_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 ()


Detailed Description

error message system

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

Copyright (c) 2006-2008, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 346 of file llerror.cpp.

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

Definition at line 344 of file llerror.cpp.

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

Definition at line 345 of file llerror.cpp.


Function Documentation

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

Definition at line 872 of file llerror.cpp.

References i.

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

Here is the caller graph for this function:

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

Definition at line 225 of file llerror.cpp.

References p, and indra::ipc::saranwrap::status().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Definition at line 656 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().

Here is the caller graph for this function:

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

Definition at line 265 of file llerror.cpp.

References p.

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

Here is the caller graph for this function:

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

Definition at line 681 of file llerror.cpp.

References LLSD::beginArray(), LLSD::endArray(), and i.

Referenced by LLError::configure().

Here is the call graph for this function:

Here is the caller graph for this function:

bool @101::shouldLogToStderr (  )  [static]

Definition at line 519 of file llerror.cpp.

Referenced by commonInit().

Here is the caller graph for this function:

bool @101::stderrLogWantsTime (  )  [static]

Definition at line 535 of file llerror.cpp.

Referenced by commonInit().

Here is the caller graph for this function:

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

Definition at line 813 of file llerror.cpp.

References LLError::Settings::get(), i, NULL, r, LLError::Settings::recorders, LLError::Recorder::recordMessage(), LLError::Settings::timeFunction, and LLError::Recorder::wantsTime().

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

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 361 of file llerror.cpp.

Definition at line 203 of file llerror.cpp.

Referenced by LLHTTPBuffer::asLLSD(), and LLHTTPBuffer::asString().

std::ostringstream messageStream

Definition at line 351 of file llerror.cpp.

Definition at line 352 of file llerror.cpp.

llofstream mFile

Definition at line 130 of file llerror.cpp.

std::string mIdentity

Definition at line 96 of file llerror.cpp.

bool mLocked

Definition at line 892 of file llerror.cpp.

bool mOK

Definition at line 893 of file llerror.cpp.

bool mTimestamp

Definition at line 170 of file llerror.cpp.

ANSIState mUseANSI

Definition at line 172 of file llerror.cpp.


Generated on Fri May 16 08:34:41 2008 for SecondLife by  doxygen 1.5.5