UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sv_log.h File Reference

game lib logging handling More...

#include <stdarg.h>

Go to the source code of this file.

Functions

void SV_LogHandleOutput (void)
 Handle the log output from the main thread by reading the strings from the dbuffer the game lib thread has written into. More...
 
void SV_LogAdd (const char *format, va_list ap)
 Async version to add a log entry for the game lib. More...
 
void SV_LogInit (void)
 
void SV_LogShutdown (void)
 

Detailed Description

game lib logging handling

Definition in file sv_log.h.

Function Documentation

void SV_LogAdd ( const char *  format,
va_list  ap 
)

Async version to add a log entry for the game lib.

Note
This is needed because using Com_Printf from within the game lib thread might freeze some systems as the console print functions are not thread safe.
Parameters
formatThe format of the message
apThe variadic function argument list to fill the format strings

Definition at line 60 of file sv_log.cpp.

References Q_vsnprintf(), STRHUNK_Add(), and svLogMutex.

Referenced by SV_dprintf(), and SV_PlayerPrintf().

void SV_LogHandleOutput ( void  )

Handle the log output from the main thread by reading the strings from the dbuffer the game lib thread has written into.

Definition at line 44 of file sv_log.cpp.

References STRHUNK_Reset(), STRHUNK_Visit(), SV_LogPrintOutput(), and svLogMutex.

Referenced by SV_Frame().

void SV_LogInit ( void  )

Definition at line 71 of file sv_log.cpp.

References STRHUNK_Create(), and svLogMutex.

Referenced by SV_Init().

void SV_LogShutdown ( void  )

Definition at line 78 of file sv_log.cpp.

References STRHUNK_Delete(), and svLogMutex.

Referenced by SV_Clear().