VR-Engage  2.2
Loading...
Searching...
No Matches
logger.h File Reference
Include dependency graph for logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __FILENAME__   (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
 
#define LOG_FATAL(channel)
 
#define LOG_WARN(channel)
 
#define LOG_INFO(channel)
 
#define LOG_VERBOSE(channel)
 
#define LOG_DEBUG(channel)
 
#define OBJCON_FATAL(channel)
 
#define OBJCON_WARN(channel)
 
#define OBJCON_INFO(channel)
 
#define OBJCON_VERBOSE(channel)
 
#define OBJCON_DEBUG(channel)
 

Functions

std::string UTIL_DLL logTimestamp ()
 
UTIL_DLL DtOutputStream & DtVreFatal (const std::string &channel, const std::string &function)
 
UTIL_DLL DtOutputStream & DtVreWarn (const std::string &channel, const std::string &function)
 
UTIL_DLL DtOutputStream & DtVreInfo (const std::string &channel, const std::string &function)
 
UTIL_DLL DtOutputStream & DtVreVerbose (const std::string &channel, const std::string &function)
 
UTIL_DLL DtOutputStream & DtVreDebug (const std::string &channel, const std::string &function)
 

Macro Definition Documentation

◆ __FILENAME__

#define __FILENAME__   (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)

Macro to extract just the filename from a full path.

This macro extracts the filename from the full path in FILE Returns the filename without the directory path

◆ LOG_FATAL

#define LOG_FATAL ( channel)
Value:
DtVreFatal(channel, __FUNCTION__)
UTIL_DLL DtOutputStream & DtVreFatal(const std::string &channel, const std::string &function)
Logs a fatal error message.

Macro to log a fatal message to log files.

Parameters
channelThe logging channel/category to use

Referenced by makVre::DtSpSubClass< SELF_T, SUPER_T >::create(), makVre::DtSpSubClass< SELF_T, SUPER_T >::createVersion(), and makVre::DtLuaObject::setField().

◆ LOG_WARN

#define LOG_WARN ( channel)
Value:
DtVreWarn(channel, __FUNCTION__)
UTIL_DLL DtOutputStream & DtVreWarn(const std::string &channel, const std::string &function)
Logs a warning message.

Macro to log a warning message to log files.

Parameters
channelThe logging channel/category to use

Referenced by makVre::DtTreeClass< SELF_T, SUPER_T >::addChild(), makVre::DtFactory< DtValueTransform >::addCreator(), makVre::DtFactory< DtValueTransform >::create(), makVre::DtInitTable::findData(), makVre::DtInitTable::findData(), makVre::DtTreeClass< SELF_T, SUPER_T >::removeChild(), makVre::DtLuaObject::setField(), and makVre::DtVreSetController< SetControllerBase >::updatePlayerControlled().

◆ LOG_INFO

#define LOG_INFO ( channel)
Value:
DtVreInfo(channel, __FUNCTION__)
UTIL_DLL DtOutputStream & DtVreInfo(const std::string &channel, const std::string &function)
Logs an informational message.

Macro to log an informational message to log files.

Parameters
channelThe logging channel/category to use

Referenced by makVre::DtFactory< DtValueTransform >::addCreator().

◆ LOG_VERBOSE

#define LOG_VERBOSE ( channel)
Value:
DtVreVerbose(channel, __FUNCTION__)
UTIL_DLL DtOutputStream & DtVreVerbose(const std::string &channel, const std::string &function)
Logs a verbose message (more detailed than info)

Macro to log a verbose message to log files.

Parameters
channelThe logging channel/category to use

Referenced by makVre::DtInitTable::findDataOr().

◆ LOG_DEBUG

#define LOG_DEBUG ( channel)
Value:
DtVreDebug(channel, __FUNCTION__)
UTIL_DLL DtOutputStream & DtVreDebug(const std::string &channel, const std::string &function)
Logs a debug message.

Macro to log a debug message to log files.

Parameters
channelThe logging channel/category to use

Referenced by makVre::DtWeaponResourceLogic::lookUpField().

◆ OBJCON_FATAL

#define OBJCON_FATAL ( channel)
Value:
entity()->objectConsoleError() << "FATAL[" << channel << "] " << logTimestamp() << " " << __FUNCTION__ << ": "
std::string UTIL_DLL logTimestamp()
Generates a timestamp string for log messages.

Macro to log a fatal message to an entity's object console.

Parameters
channelThe logging channel/category to use

◆ OBJCON_WARN

#define OBJCON_WARN ( channel)
Value:
entity()->objectConsoleWarn() << "WARN[" << channel << "] " << logTimestamp() << " " << __FUNCTION__ << ": "

Macro to log a warning message to an entity's object console.

Parameters
channelThe logging channel/category to use

◆ OBJCON_INFO

#define OBJCON_INFO ( channel)
Value:
entity()->objectConsoleInfo() << "INFO[" << channel << "] " << logTimestamp() << " " << __FUNCTION__ << ": "

Macro to log an informational message to an entity's object console.

Parameters
channelThe logging channel/category to use

◆ OBJCON_VERBOSE

#define OBJCON_VERBOSE ( channel)
Value:
entity()->objectConsoleVerbose() << "VERBOSE[" << channel << "] " << logTimestamp() << " " << __FUNCTION__ << ": "

Macro to log a verbose message to an entity's object console.

Parameters
channelThe logging channel/category to use

◆ OBJCON_DEBUG

#define OBJCON_DEBUG ( channel)
Value:
entity()->objectConsoleDebug() << "DEBUG[" << channel << "] " << logTimestamp() << " " << __FUNCTION__ << ": "

Macro to log a debug message to an entity's object console.

Parameters
channelThe logging channel/category to use

Function Documentation

◆ logTimestamp()

std::string UTIL_DLL logTimestamp ( )

Generates a timestamp string for log messages.

Returns
A formatted timestamp string for use in log messages

References UTIL_DLL.

◆ DtVreFatal()

UTIL_DLL DtOutputStream & DtVreFatal ( const std::string & channel,
const std::string & function )

Logs a fatal error message.

Parameters
channelThe logging channel/category to use
functionThe function name where the log originated
Returns
An output stream to write the message to

References UTIL_DLL.

◆ DtVreWarn()

UTIL_DLL DtOutputStream & DtVreWarn ( const std::string & channel,
const std::string & function )

Logs a warning message.

Parameters
channelThe logging channel/category to use
functionThe function name where the log originated
Returns
An output stream to write the message to

References UTIL_DLL.

◆ DtVreInfo()

UTIL_DLL DtOutputStream & DtVreInfo ( const std::string & channel,
const std::string & function )

Logs an informational message.

Parameters
channelThe logging channel/category to use
functionThe function name where the log originated
Returns
An output stream to write the message to

References UTIL_DLL.

◆ DtVreVerbose()

UTIL_DLL DtOutputStream & DtVreVerbose ( const std::string & channel,
const std::string & function )

Logs a verbose message (more detailed than info)

Parameters
channelThe logging channel/category to use
functionThe function name where the log originated
Returns
An output stream to write the message to

References UTIL_DLL.

◆ DtVreDebug()

UTIL_DLL DtOutputStream & DtVreDebug ( const std::string & channel,
const std::string & function )

Logs a debug message.

Parameters
channelThe logging channel/category to use
functionThe function name where the log originated
Returns
An output stream to write the message to

References UTIL_DLL.