TrueReality  v0.1.1912
trUtil::Logging Namespace Reference

Classes

class  Log
 Log class which the engine uses for all of its logging needs. More...
 
class  LogFile
 A log file. More...
 
class  LoggingOff
 Scoped variable to turn off logging (except for always) for a block of code. More...
 
class  LogImpl
 
class  LogManager
 Manager for logs. More...
 
class  LogTimeProvider
 Interface class get the time for the logger. More...
 
class  LogWriter
 Interface class to receive messages from the Log. More...
 
class  LogWriterConsole
 Specialized LogWriter used to display Log messages in the console window. More...
 
class  LogWriterFile
 A specialized LogWriter class that outputs Log messages to a file. More...
 

Functions

static const std::string LOG_DEBUG_STR ("Debug")
 String value for DEBUG Logging level. More...
 
static const std::string LOG_INFO_STR ("Info")
 String value for INFO Logging level. More...
 
static const std::string LOG_WARNING_STR ("Warning")
 String value for WARNING Logging level. More...
 
static const std::string LOG_ERROR_STR ("Error")
 String value for ERROR Logging level. More...
 
static const std::string LOG_ALWAYS_STR ("Always")
 String value for ALWAYS Logging level. More...
 
TR_UTIL_EXPORT LogLevel LogLevelFromString (const std::string &levelString)
 Logs level from string. More...
 
const TR_UTIL_EXPORT std::string & LogLevelToString (LogLevel logLevel)
 Logs level to string. More...
 
static osg::ref_ptr< LogManagerLOG_MANAGER (NULL)
 
static LogLevel DEFAULT_LOG_LEVEL (LogLevel::LOG_WARNING)
 

Function Documentation

◆ DEFAULT_LOG_LEVEL()

static LogLevel trUtil::Logging::DEFAULT_LOG_LEVEL ( LogLevel::LOG_WARNING  )
static

Referenced by trUtil::Logging::Log::SetDefaultLogLevel().

Here is the caller graph for this function:

◆ LOG_ALWAYS_STR()

static const std::string trUtil::Logging::LOG_ALWAYS_STR ( "Always"  )
static

String value for ALWAYS Logging level.

Referenced by LogLevelFromString(), LogLevelToString(), and trUtil::DefaultSettings::SetupLoggingOptions().

Here is the caller graph for this function:

◆ LOG_DEBUG_STR()

static const std::string trUtil::Logging::LOG_DEBUG_STR ( "Debug"  )
static

String value for DEBUG Logging level.

Referenced by LogLevelFromString(), LogLevelToString(), ParseCmdLineArgs(), and trUtil::DefaultSettings::SetupLoggingOptions().

Here is the caller graph for this function:

◆ LOG_ERROR_STR()

static const std::string trUtil::Logging::LOG_ERROR_STR ( "Error"  )
static

String value for ERROR Logging level.

Referenced by LogLevelFromString(), LogLevelToString(), ParseCmdLineArgs(), and trUtil::DefaultSettings::SetupLoggingOptions().

Here is the caller graph for this function:

◆ LOG_INFO_STR()

static const std::string trUtil::Logging::LOG_INFO_STR ( "Info"  )
static

String value for INFO Logging level.

Referenced by LogLevelFromString(), LogLevelToString(), ParseCmdLineArgs(), and trUtil::DefaultSettings::SetupLoggingOptions().

Here is the caller graph for this function:

◆ LOG_MANAGER()

◆ LOG_WARNING_STR()

static const std::string trUtil::Logging::LOG_WARNING_STR ( "Warning"  )
static

String value for WARNING Logging level.

Referenced by LogLevelFromString(), LogLevelToString(), ParseCmdLineArgs(), and trUtil::DefaultSettings::SetupLoggingOptions().

Here is the caller graph for this function:

◆ LogLevelFromString()

LogLevel trUtil::Logging::LogLevelFromString ( const std::string &  levelString)

Logs level from string.

Parameters
levelStringThe level string.
Returns
the LogLevel matching a string or WARNING if there is no match. The values that are checked against are the LogLevel Strings: LOG_DEBUG_STR, LOG_INFO_STR, LOG_WARNING_STR, LOG_ERROR_STR, LOG_ALWAYS_STR.

Definition at line 32 of file LogLevel.cpp.

References LOG_ALWAYS_STR(), LOG_DEBUG, LOG_DEBUG_STR(), LOG_ERROR, LOG_ERROR_STR(), LOG_INFO, LOG_INFO_STR(), LOG_WARNING, and LOG_WARNING_STR().

Referenced by trUtil::Logging::Log::GetLogLevelForString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LogLevelToString()

const std::string & trUtil::Logging::LogLevelToString ( LogLevel  logLevel)

Logs level to string.

Parameters
logLevelThe log level.
Returns
a string version of a LogLevel. LOG_WARNING_STR is returned if there is no match.

Definition at line 61 of file LogLevel.cpp.

References LOG_ALWAYS_STR(), LOG_DEBUG, LOG_DEBUG_STR(), LOG_ERROR, LOG_ERROR_STR(), LOG_INFO, LOG_INFO_STR(), LOG_WARNING, and LOG_WARNING_STR().

Referenced by trUtil::Logging::Log::GetLogLevelString().

Here is the call graph for this function:
Here is the caller graph for this function: