Kaim::DefaultLog Class Reference

Kaim::DefaultLog Class Reference

#include <defaultlog.h>

Class Description

Default implementation of the BaseLog interface.

If LogToFile is passed to SetLogToMode(), then DefaultLog depends on the MemorySystem

Inherits Kaim::BaseLog.

Public Member Functions

virtual void LogMessageVarg (LogMessageId messageId, const char *fmt, va_list argList)
 calls LogBuffer() More...
 
virtual void ReleaseMemorySystemResources ()
 This is called in Kaim::BaseSystem::Destroy() before Navigation memory system is destroyed. More...
 
void SetLogToMode (LogToModeMask logToMode)
 close m_file More...
 
void SetupLogFile (const char *logAbsPath, FileOpenerBase *fileOpener=nullptr)
 .GwNavLog will be appended to logAbsPath More...
 
virtual void SetVisualDebugServer (VisualDebugServer *visualDebugServer)
 Beware, when running multiple worlds, the log from all worlds will be sent to this VisualDebugServer even if the VisualDebugServer is associated with 1 world. More...
 

Static Public Member Functions

static void SetGlobalBaseLog (BaseLog *log)
 SetGlobalBaseLog(BaseLog* log) must be used instead of SetGlobalLog(Log* log) More...
 

Member Function Documentation

void Kaim::DefaultLog::LogMessageVarg ( LogMessageId  messageId,
const char *  fmt,
va_list  argList 
)
virtual

calls LogBuffer()

void Kaim::DefaultLog::ReleaseMemorySystemResources ( )
virtual

This is called in Kaim::BaseSystem::Destroy() before Navigation memory system is destroyed.

So, implementations of BaseLog that allocated Kaim::BaseSystem resources (e.g. using KY_MALLOC or KY_NEW or Kaim::SysFile) must release these resources in this function. Otherwise, expect crashes.

Reimplemented from Kaim::BaseLog.

static void Kaim::BaseLog::SetGlobalBaseLog ( BaseLog log)
inlinestaticinherited

SetGlobalBaseLog(BaseLog* log) must be used instead of SetGlobalLog(Log* log)

void Kaim::DefaultLog::SetLogToMode ( LogToModeMask  logToMode)
inline

close m_file

Sets the output locations in which debug messages will be printed. logToMode is a bitmask composed of elements from the LogToMode enumeration.

void Kaim::DefaultLog::SetupLogFile ( const char *  logAbsPath,
FileOpenerBase fileOpener = nullptr 
)

.GwNavLog will be appended to logAbsPath

+ Examples:
virtual void Kaim::DefaultLog::SetVisualDebugServer ( VisualDebugServer *  visualDebugServer)
inlinevirtual

Beware, when running multiple worlds, the log from all worlds will be sent to this VisualDebugServer even if the VisualDebugServer is associated with 1 world.

The SetVisualDebugServer() is called atuomatically by the first call to World::StartVisualDebug().

Implements Kaim::BaseLog.


The documentation for this class was generated from the following files:
  • gwnavruntime/basesystem/defaultlog.h
  • gwnavruntime/basesystem/defaultlog.cpp