Otclient  14/8/2020
logger.h File Reference
#include "../global.h"
#include <framework/stdext/thread.h>
#include <fstream>
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.

Classes

struct  LogMessage
 
class  Logger
 

Macros

#define trace()   logFunc(Fw::LogDebug, "", __PRETTY_FUNCTION__)
 
#define traceDebug(a)   logFunc(Fw::LogDebug, a, __PRETTY_FUNCTION__)
 
#define traceInfo(a)   logFunc(Fw::LogInfo, a, __PRETTY_FUNCTION__)
 
#define traceWarning(a)   logFunc(Fw::LogWarning, a, __PRETTY_FUNCTION__)
 
#define traceError(a)   logFunc(Fw::LogError, a, __PRETTY_FUNCTION__)
 
#define logTraceCounter()
 
#define logTraceFrameCounter()
 

Variables

Logger g_logger
 

Macro Definition Documentation

◆ logTraceCounter

#define logTraceCounter ( )
Value:
{ \
static int __count = 0; \
static Timer __timer; \
__count++; \
if(__timer.ticksElapsed() >= 1000) { \
logTraceDebug(__count); \
__count = 0; \
__timer.restart(); \
} \
}

Definition at line 76 of file logger.h.

◆ logTraceFrameCounter

#define logTraceFrameCounter ( )
Value:
{ \
static int __count = 0; \
static Timer __timer; \
__count++; \
if(__timer.ticksElapsed() > 0) { \
logTraceDebug(__count); \
__count = 0; \
__timer.restart(); \
} \
}

Definition at line 87 of file logger.h.

◆ trace

#define trace ( )    logFunc(Fw::LogDebug, "", __PRETTY_FUNCTION__)

Definition at line 70 of file logger.h.

◆ traceDebug

#define traceDebug (   a)    logFunc(Fw::LogDebug, a, __PRETTY_FUNCTION__)

Definition at line 71 of file logger.h.

◆ traceError

#define traceError (   a)    logFunc(Fw::LogError, a, __PRETTY_FUNCTION__)

Definition at line 74 of file logger.h.

◆ traceInfo

#define traceInfo (   a)    logFunc(Fw::LogInfo, a, __PRETTY_FUNCTION__)

Definition at line 72 of file logger.h.

◆ traceWarning

#define traceWarning (   a)    logFunc(Fw::LogWarning, a, __PRETTY_FUNCTION__)

Definition at line 73 of file logger.h.

Variable Documentation

◆ g_logger

Logger g_logger

Definition at line 35 of file logger.cpp.

Timer
Definition: timer.h:28