Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

log.h File Reference


Detailed Description

innotek Portable Runtime - Logging.

Definition in file log.h.

#include <iprt/cdefs.h>
#include <iprt/types.h>
#include <iprt/stdarg.h>

Go to the source code of this file.

Classes

struct  RTLOGGER
struct  RTLOGGERGC

Release Logging

#define LogIt(pvInst, fFlags, iGroup, fmtargs)   do { } while (0)
#define LogRel(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, LOG_GROUP, a)
#define LogRel2(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_2, LOG_GROUP, a)
#define LogRel3(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_3, LOG_GROUP, a)
#define LogRel4(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_4, LOG_GROUP, a)
#define LogRel5(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_5, LOG_GROUP, a)
#define LogRel6(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_6, LOG_GROUP, a)
#define LogRelAchim(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_ACHIM, LOG_GROUP, a)
#define LogRelBird(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_BIRD, LOG_GROUP, a)
#define LogRelDmik(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_DMIK, LOG_GROUP, a)
#define LogRelFlow(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_FLOW, LOG_GROUP, a)
#define LogRelFrank(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_FRANK, LOG_GROUP, a)
#define LogRelFunc(a)   do { LogRel(("%s: ", __PRETTY_FUNCTION__)); LogRel(a); } while (0)
#define LogRelIs2Enabled()   LogRelIsItEnabled(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_2, LOG_GROUP)
#define LogRelIs3Enabled()   LogRelIsItEnabled(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_3, LOG_GROUP)
#define LogRelIs4Enabled()   LogRelIsItEnabled(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_4, LOG_GROUP)
#define LogRelIs5Enabled()   LogRelIsItEnabled(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_5, LOG_GROUP)
#define LogRelIs6Enabled()   LogRelIsItEnabled(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_6, LOG_GROUP)
#define LogRelIsEnabled()   LogRelIsItEnabled(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, LOG_GROUP)
#define LogRelIsFlowEnabled()   LogRelIsItEnabled(LOG_REL_INSTANCE, RTLOGGRPFLAGS_FLOW, LOG_GROUP)
#define LogRelIsItEnabled(pvInst, fFlags, iGroup)   LogRelIsItEnabledInternal((pvInst), (unsigned)(iGroup), (unsigned)(fFlags))
#define LogRelIt(pvInst, fFlags, iGroup, fmtargs)
#define LogRelKlaus(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_KLAUS, LOG_GROUP, a)
#define LogRelLelik(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LELIK, LOG_GROUP, a)
#define LogRelMichael(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_MICHAEL, LOG_GROUP, a)
#define LogRelNoName(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_NONAME, LOG_GROUP, a)
#define LogRelSander(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_SANDER, LOG_GROUP, a)
#define LogRelSunlover(a)   LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_SUNLOVER, LOG_GROUP, a)
#define LogRelThisFunc(a)   do { LogRel(("{%p} %s: ", this, __PRETTY_FUNCTION__)); LogRel(a); } while (0)
unsigned unsigned const char
va_list 
args
unsigned fFlags
unsigned unsigned iGroup
unsigned unsigned const char * pszFormat
 DECLINLINE (bool) LogRelIsItEnabledInternal(void *pvInst
 RTDECL (PRTLOGGER) RTLogRelSetDefaultInstance(PRTLOGGER pLogger)

Defines

#define Log(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, LOG_GROUP, a)
#define Log2(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_2, LOG_GROUP, a)
#define Log3(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_3, LOG_GROUP, a)
#define Log4(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_4, LOG_GROUP, a)
#define Log5(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_5, LOG_GROUP, a)
#define Log6(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_6, LOG_GROUP, a)
#define LOG_DISABLED
#define LOG_GROUP   RTLOGGROUP_DEFAULT
#define LOG_INSTANCE   NULL
#define LOG_REL_INSTANCE   NULL
#define LogAchim(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_ACHIM, LOG_GROUP, a)
#define LogBird(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_BIRD, LOG_GROUP, a)
#define LogDmik(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_DMIK, LOG_GROUP, a)
#define LogFlow(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_FLOW, LOG_GROUP, a)
#define LogFlowFunc(m)   do { LogFlow(("%s: ", __PRETTY_FUNCTION__)); LogFlow(m); } while (0)
#define LogFlowFuncEnter()   LogFlowFunc(("ENTER\n"))
#define LogFlowFuncLeave()   LogFlowFunc(("LEAVE\n"))
#define LogFlowThisFunc(m)   do { LogFlow(("{%p} %s: ", this, __PRETTY_FUNCTION__)); LogFlow(m); } while (0)
#define LogFlowThisFuncEnter()   LogFlowThisFunc(("ENTER\n"))
#define LogFlowThisFuncLeave()   LogFlowThisFunc(("LEAVE\n"))
#define LogFrank(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_FRANK, LOG_GROUP, a)
#define LogIs2Enabled()   LogIsItEnabled(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_2, LOG_GROUP)
#define LogIs3Enabled()   LogIsItEnabled(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_3, LOG_GROUP)
#define LogIs4Enabled()   LogIsItEnabled(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_4, LOG_GROUP)
#define LogIs5Enabled()   LogIsItEnabled(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_5, LOG_GROUP)
#define LogIs6Enabled()   LogIsItEnabled(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_6, LOG_GROUP)
#define LogIsEnabled()   LogIsItEnabled(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, LOG_GROUP)
#define LogIsFlowEnabled()   LogIsItEnabled(LOG_INSTANCE, RTLOGGRPFLAGS_FLOW, LOG_GROUP)
#define LogIsItEnabled(pvInst, fFlags, iGroup)   (false)
#define LogKlaus(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_KLAUS, LOG_GROUP, a)
#define LogLelik(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_LELIK, LOG_GROUP, a)
#define LogMichael(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_MICHAEL, LOG_GROUP, a)
#define LogNoName(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_NONAME, LOG_GROUP, a)
#define LogObjRefCnt(obj)
#define LogSander(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_SANDER, LOG_GROUP, a)
#define LogSunlover(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_SUNLOVER, LOG_GROUP, a)
#define LogTrace()   LogFlow((">>>>> %s (%d): %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__))
#define LogTraceMsg(m)   do { LogTrace(); LogFlow(m); } while (0)
#define LogWarning(m)   do { Log(("WARNING! ")); Log(m); } while (0)
#define LogWarningFunc(m)   do { Log(("%s: WARNING! ", __PRETTY_FUNCTION__)); Log(m); } while (0)
#define LogWarningThisFunc(m)   do { Log(("{%p} %s: WARNING! ", this, __PRETTY_FUNCTION__)); Log(m); } while (0)
#define RT_LOGGROUP_NAMES
#define RTLOGGER_MAGIC   0x19281207
#define RTLOGGERGC_MAGIC   0x19320731
Backdoor Logging
#define LogBackdoor(a)   do { } while (0)
#define LogBackdoorFlow(a)   do { } while (0)
#define LogRelBackdoor(a)   RTLogBackdoorPrintf a
COM port logging
{

#define LogCom(a)   do { } while (0)
#define LogComFlow(a)   do { } while (0)

Typedefs

typedef const char size_t cbChars
typedef const char * pachChars
typedef const RTLOGGERPCRTLOGGER
typedef const RTLOGGERGCPCRTLOGGERGC
typedef FNRTLOGFLUSH * PFNRTLOGFLUSH
typedef typedef FNRTLOGGER * PFNRTLOGGER
typedef FNRTSTROUTPUT * PFNRTSTROUTPUT
typedef RTLOGGERPRTLOGGER
typedef RTLOGGERGCPRTLOGGERGC
typedef struct RTLOGGER RTLOGGER
typedef struct RTLOGGERGC RTLOGGERGC

Enumerations

enum  RTLOGDEST {
  RTLOGDEST_FILE = 0x00000001, RTLOGDEST_STDOUT = 0x00000002, RTLOGDEST_STDERR = 0x00000004, RTLOGDEST_DEBUGGER = 0x00000008,
  RTLOGDEST_COM = 0x00000010, RTLOGDEST_DUMMY = 0x20000000, RTLOGDEST_USER = 0x40000000
}
enum  RTLOGFLAGS {
  RTLOGFLAGS_DISABLED = 0x00000001, RTLOGFLAGS_BUFFERED = 0x00000002, RTLOGFLAGS_USECRLF = 0x00000010, RTLOGFLAGS_REL_TS = 0x00010000,
  RTLOGFLAGS_DECIMAL_TS = 0x00020000, RTLOGFLAGS_PREFIX_FLAG_NO = 0x00040000, RTLOGFLAGS_PREFIX_FLAG = 0x00080000, RTLOGFLAGS_PREFIX_GROUP_NO = 0x00100000,
  RTLOGFLAGS_PREFIX_GROUP = 0x00200000, RTLOGFLAGS_PREFIX_TID = 0x00400000, RTLOGFLAGS_PREFIX_THREAD = 0x00800000, RTLOGFLAGS_PREFIX_TIME_PROG = 0x04000000,
  RTLOGFLAGS_PREFIX_TIME = 0x08000000, RTLOGFLAGS_PREFIX_MS_PROG = 0x10000000, RTLOGFLAGS_PREFIX_TSC = 0x20000000, RTLOGFLAGS_PREFIX_TS = 0x40000000,
  RTLOGFLAGS_PREFIX_MASK = 0x7cff0000
}
enum  RTLOGGROUP {
  RTLOGGROUP_DEFAULT, RTLOGGROUP_DIR, RTLOGGROUP_FILE, RTLOGGROUP_FS,
  RTLOGGROUP_LDR, RTLOGGROUP_PATH, RTLOGGROUP_PROCESS, RTLOGGROUP_THREAD,
  RTLOGGROUP_TIME, RTLOGGROUP_TIMER, RTLOGGROUP_ZIP = 31, RTLOGGROUP_FIRST_USER = 32
}
enum  RTLOGGRPFLAGS {
  RTLOGGRPFLAGS_ENABLED = 0x00000001, RTLOGGRPFLAGS_LEVEL_1 = 0x00000002, RTLOGGRPFLAGS_LEVEL_2 = 0x00000004, RTLOGGRPFLAGS_LEVEL_3 = 0x00000008,
  RTLOGGRPFLAGS_LEVEL_4 = 0x00000010, RTLOGGRPFLAGS_LEVEL_5 = 0x00000020, RTLOGGRPFLAGS_LEVEL_6 = 0x00000040, RTLOGGRPFLAGS_FLOW = 0x00000080,
  RTLOGGRPFLAGS_LELIK = 0x00000100, RTLOGGRPFLAGS_MICHAEL = 0x00000200, RTLOGGRPFLAGS_DMIK = 0x00000400, RTLOGGRPFLAGS_SUNLOVER = 0x00000800,
  RTLOGGRPFLAGS_ACHIM = 0x00001000, RTLOGGRPFLAGS_SANDER = 0x00002000, RTLOGGRPFLAGS_KLAUS = 0x00004000, RTLOGGRPFLAGS_FRANK = 0x00008000,
  RTLOGGRPFLAGS_BIRD = 0x00010000, RTLOGGRPFLAGS_NONAME = 0x00020000
}

Functions

typedef DECLCALLBACK (size_t) FNRTSTROUTPUT(void *pvArg
typedef DECLCALLBACK (void) FNRTLOGGER(const char *pszFormat
typedef GCPTRTYPE (FNRTLOGFLUSHGC *) PFNRTLOGFLUSHGC
 RTDECL (size_t) RTLogFormatV(PFNRTSTROUTPUT pfnOutput
 RTDECL (int) RTLogCreate(PRTLOGGER *ppLogger
 RTDECL (void) RTLogPrintfEx(void *pvInstance

Variables

size_t cb
size_t cbLogger
PRTLOGGERGC size_t cbLoggerGC
RTUINT const char const char
unsigned const char *const
RTUINT const char RTUINT const
char const char unsigned const
char *const RTUINT char size_t 
cchErrorMsg
RTUINT const char const char
unsigned 
cGroups
RTUINT const char const char
unsigned const char *const
RTUINT 
fDestFlags
PCRTLOGGER unsigned unsigned fFlagsAnd
PCRTLOGGER unsigned fFlagsOr
RTUINT const char const char
unsigned const char *const * 
papszGroups
PRTLOGGER pDstLogger
size_t PFNRTLOGGER PFNRTLOGFLUSH pfnFlush
PRTLOGGERGC size_t RTGCPTR RTGCPTR pfnFlushGCPtr
size_t PFNRTLOGGER pfnLogger
PRTLOGGERGC size_t RTGCPTR pfnLoggerGCPtr
PRTLOGGERGC pLoggerGC
PCRTLOGGER pSrcLogger
RTUINT const char const char * pszEnvVarBase
RTUINT const char const char
unsigned const char *const
RTUINT const char RTUINT const
char const char unsigned const
char *const RTUINT char * 
pszErrorMsg
RTUINT const char const char
unsigned const char *const
RTUINT const char * 
pszFilenameFmt
RTUINT const char * pszGroupSettings
const char * pszVar
void * pvArg
void * pvCallerRet


Generated by  Doxygen 1.6.0   Back to index