The logger class. More...

#include "murl_debug_logger.h"

Static Public Member Functions

static void Init (const String &logFileName)
 Initialize the logger module. More...
 
static void DeInit ()
 Deinitialize the logger module. More...
 
static void SetLogFileName (const String &logFileName)
 Set the log file name. More...
 
static const StringGetLogFileName ()
 Get the log file name. More...
 
static void SetTraceFunctionItems (UInt32 itemMask)
 Set the trace items' bit mask. More...
 
static UInt32 GetTraceFunctionItems ()
 Get the trace items' bit mask. More...
 
static void SetLogLevel (SInt32 level)
 Set the global log level. More...
 
static SInt32 GetLogLevel ()
 Get the global log level. More...
 
static void PrintDebug (const Char *message)
 Print a message to the system's debug logging output. More...
 
static void PrintDebugVA (SInt32 level, const Char *funcName, UInt32 line,...)
 Print a message to the system's debug logging output. More...
 
static void PrintError (const Char *message)
 Print a message to the system's error logging output. More...
 
static void PrintWarning (const Char *message)
 Print a message to the system's warning logging output. More...
 
static void PrintErrorVA (const Char *funcName, UInt32 line,...)
 Print a message to the system's error logging output. More...
 
static void PrintWarningVA (const Char *funcName, UInt32 line,...)
 Print a message to the system's warning logging output. More...
 

Detailed Description

The logger class.

Member Function Documentation

◆ Init()

static void Murl::Debug::Logger::Init ( const String logFileName)
static

Initialize the logger module.

Initializing is done by the engine's core module at startup. The core sets the log file name to IEngineConfiguration::GetLogFileFullPath(). If the log file name is empty no file is written.

Parameters
logFileNameThe file name of the log file.

◆ DeInit()

static void Murl::Debug::Logger::DeInit ( )
static

Deinitialize the logger module.

Deinitializing is done by the engine's core module at shutdown.

◆ SetLogFileName()

static void Murl::Debug::Logger::SetLogFileName ( const String logFileName)
static

Set the log file name.

If the log file name is empty no file is written.

Parameters
logFileNameThe file name of the log file.

◆ GetLogFileName()

static const String& Murl::Debug::Logger::GetLogFileName ( )
static

Get the log file name.

Returns
The file name of the log file.

◆ SetTraceFunctionItems()

static void Murl::Debug::Logger::SetTraceFunctionItems ( UInt32  itemMask)
static

Set the trace items' bit mask.

The itemMask parameter represents a bit mask of individual values from the IEnums::DebugOutputFunctionItem enumeration, which can be used to select individual items to trace for each function/method call.

Parameters
itemMaskThe trace item bit mask.

◆ GetTraceFunctionItems()

static UInt32 Murl::Debug::Logger::GetTraceFunctionItems ( )
static

Get the trace items' bit mask.

Returns
The trace item bit mask.

◆ SetLogLevel()

static void Murl::Debug::Logger::SetLogLevel ( SInt32  level)
static

Set the global log level.

Parameters
levelThe log level.

◆ GetLogLevel()

static SInt32 Murl::Debug::Logger::GetLogLevel ( )
static

Get the global log level.

Returns
The log level.

◆ PrintDebug()

static void Murl::Debug::Logger::PrintDebug ( const Char message)
static

Print a message to the system's debug logging output.

If a log file name is set, the string is added to the file.

Parameters
messageThe message string to print.

◆ PrintDebugVA()

static void Murl::Debug::Logger::PrintDebugVA ( SInt32  level,
const Char funcName,
UInt32  line,
  ... 
)
static

Print a message to the system's debug logging output.

This method can be used to print a variable-length argument list to the log output, with a given function name and source line prepended to the output string. Output is only generated when the given level is equal or below the globally set log level. If a log file name is set, the string is added to the file.

Parameters
levelThe log level
funcNameThe caller's function name
lineThe source code line to add

◆ PrintError()

static void Murl::Debug::Logger::PrintError ( const Char message)
static

Print a message to the system's error logging output.

If a log file name is set, the string is added to the file.

Parameters
messageThe message string to print.

Referenced by Murl::Debug::Error().

◆ PrintWarning()

static void Murl::Debug::Logger::PrintWarning ( const Char message)
static

Print a message to the system's warning logging output.

If a log file name is set, the string is added to the file.

Parameters
messageThe message string to print.

◆ PrintErrorVA()

static void Murl::Debug::Logger::PrintErrorVA ( const Char funcName,
UInt32  line,
  ... 
)
static

Print a message to the system's error logging output.

This method can be used to print a variable-length argument list to the log output, with a given function name and source line prepended to the output string. If a log file name is set, the string is added to the file.

Parameters
funcNameThe caller's function name
lineThe source code line to add

◆ PrintWarningVA()

static void Murl::Debug::Logger::PrintWarningVA ( const Char funcName,
UInt32  line,
  ... 
)
static

Print a message to the system's warning logging output.

This method can be used to print a variable-length argument list to the log output, with a given function name and source line prepended to the output string. If a log file name is set, the string is added to the file.

Parameters
funcNameThe caller's function name
lineThe source code line to add

The documentation for this class was generated from the following file:
  • murl_debug_logger.h


Copyright © 2011-2024 Spraylight GmbH.