OpenClonk
C4SimpleLog.cpp File Reference
#include "C4Include.h"
#include "lib/C4Log.h"
Include dependency graph for C4SimpleLog.cpp:

Go to the source code of this file.

Macros

#define IMPLEMENT_LOGF(func)
 

Functions

bool Log (const char *msg)
 
bool DebugLog (const char *strMessage)
 
bool LogFatal (const char *strMessage)
 

Variables

bool fQuiet = false
 

Macro Definition Documentation

◆ IMPLEMENT_LOGF

#define IMPLEMENT_LOGF (   func)
Value:
bool func(const char *msg, ...) { \
va_list args; va_start(args, msg); \
StdStrBuf Buf; \
Buf.FormatV(msg, args); \
return Log(Buf.getData()); \
}
bool Log(const char *msg)
Definition: C4SimpleLog.cpp:27

Definition at line 36 of file C4SimpleLog.cpp.

Function Documentation

◆ DebugLog()

bool DebugLog ( const char *  strMessage)

Definition at line 33 of file C4SimpleLog.cpp.

References Log().

33 { return Log(strMessage); }
bool Log(const char *msg)
Definition: C4SimpleLog.cpp:27
Here is the call graph for this function:

◆ Log()

bool Log ( const char *  msg)

Definition at line 27 of file C4SimpleLog.cpp.

References fQuiet.

Referenced by DebugLog(), and LogFatal().

28 {
29  if (!fQuiet)
30  printf("%s\n", msg);
31  return true;
32 }
bool fQuiet
Definition: C4SimpleLog.cpp:25
Here is the caller graph for this function:

◆ LogFatal()

bool LogFatal ( const char *  strMessage)

Definition at line 34 of file C4SimpleLog.cpp.

References Log().

34 { return Log(strMessage); }
bool Log(const char *msg)
Definition: C4SimpleLog.cpp:27
Here is the call graph for this function:

Variable Documentation

◆ fQuiet

bool fQuiet = false

Definition at line 25 of file C4SimpleLog.cpp.

Referenced by Log(), main(), and ProcessGroup().