FreeRDP
wlog.c File Reference
#include <stdio.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/debug.h>
#include <winpr/environment.h>
#include <winpr/wlog.h>
#include "wlog.h"

Functions

static wLog * WLog_New (LPCSTR name, wLog *rootLogger)
 
static void WLog_Free (wLog *log)
 
static LONG WLog_GetFilterLogLevel (wLog *log)
 
static int WLog_ParseLogLevel (LPCSTR level)
 
static BOOL WLog_ParseFilter (wLogFilter *filter, LPCSTR name)
 
static BOOL WLog_ParseFilters (void)
 
static void WLog_Uninit_ (void)
 
static BOOL CALLBACK WLog_InitializeRoot (PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
 
static BOOL log_recursion (LPCSTR file, LPCSTR fkt, int line)
 
static BOOL WLog_Write (wLog *log, wLogMessage *message)
 
static BOOL WLog_WriteData (wLog *log, wLogMessage *message)
 
static BOOL WLog_WriteImage (wLog *log, wLogMessage *message)
 
static BOOL WLog_WritePacket (wLog *log, wLogMessage *message)
 
BOOL WLog_PrintMessageVA (wLog *log, DWORD type, DWORD level, DWORD line, const char *file, const char *function, va_list args)
 
BOOL WLog_PrintMessage (wLog *log, DWORD type, DWORD level, DWORD line, const char *file, const char *function,...)
 
DWORD WLog_GetLogLevel (wLog *log)
 
BOOL WLog_SetStringLogLevel (wLog *log, LPCSTR level)
 
BOOL WLog_AddStringLogFilters (LPCSTR filter)
 
BOOL WLog_SetLogLevel (wLog *log, DWORD logLevel)
 
static BOOL WLog_ParseName (wLog *log, LPCSTR name)
 
wLog * WLog_GetRoot (void)
 
static BOOL WLog_AddChild (wLog *parent, wLog *child)
 
static wLog * WLog_FindChild (LPCSTR name)
 
wLog * WLog_Get (LPCSTR name)
 
BOOL WLog_Init (void)
 
BOOL WLog_Uninit (void)
 

Variables

LPCSTR WLOG_LEVELS [7]
 
static INIT_ONCE _WLogInitialized = INIT_ONCE_STATIC_INIT
 
static DWORD g_FilterCount = 0
 
static wLogFilter * g_Filters = NULL
 
static wLog * g_RootLog = NULL
 

Function Documentation

static BOOL log_recursion ( LPCSTR  file,
LPCSTR  fkt,
int  line 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL WLog_AddChild ( wLog *  parent,
wLog *  child 
)
static

Here is the caller graph for this function:

BOOL WLog_AddStringLogFilters ( LPCSTR  filter)

Here is the call graph for this function:

Here is the caller graph for this function:

static wLog* WLog_FindChild ( LPCSTR  name)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void WLog_Free ( wLog *  log)
static

Here is the call graph for this function:

Here is the caller graph for this function:

wLog* WLog_Get ( LPCSTR  name)

Here is the call graph for this function:

LONG WLog_GetFilterLogLevel ( wLog *  log)
static

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD WLog_GetLogLevel ( wLog *  log)

Here is the call graph for this function:

Here is the caller graph for this function:

wLog* WLog_GetRoot ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL WLog_Init ( void  )

Deprecated

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL CALLBACK WLog_InitializeRoot ( PINIT_ONCE  InitOnce,
PVOID  Parameter,
PVOID *  Context 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

wLog * WLog_New ( LPCSTR  name,
wLog *  rootLogger 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL WLog_ParseFilter ( wLogFilter *  filter,
LPCSTR  name 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL WLog_ParseFilters ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

int WLog_ParseLogLevel ( LPCSTR  level)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL WLog_ParseName ( wLog *  log,
LPCSTR  name 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL WLog_PrintMessage ( wLog *  log,
DWORD  type,
DWORD  level,
DWORD  line,
const char *  file,
const char *  function,
  ... 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL WLog_PrintMessageVA ( wLog *  log,
DWORD  type,
DWORD  level,
DWORD  line,
const char *  file,
const char *  function,
va_list  args 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL WLog_SetLogLevel ( wLog *  log,
DWORD  logLevel 
)

Here is the caller graph for this function:

BOOL WLog_SetStringLogLevel ( wLog *  log,
LPCSTR  level 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL WLog_Uninit ( void  )

Deprecated

Here is the caller graph for this function:

static void WLog_Uninit_ ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL WLog_Write ( wLog *  log,
wLogMessage *  message 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL WLog_WriteData ( wLog *  log,
wLogMessage *  message 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL WLog_WriteImage ( wLog *  log,
wLogMessage *  message 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL WLog_WritePacket ( wLog *  log,
wLogMessage *  message 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

INIT_ONCE _WLogInitialized = INIT_ONCE_STATIC_INIT
static
DWORD g_FilterCount = 0
static
wLogFilter* g_Filters = NULL
static
wLog* g_RootLog = NULL
static
LPCSTR WLOG_LEVELS[7]
Initial value:
=
{
"TRACE",
"DEBUG",
"INFO",
"WARN",
"ERROR",
"FATAL",
"OFF"
}

References for general logging concepts:

Short introduction to log4j: http://logging.apache.org/log4j/1.2/manual.html

logging - Logging facility for Python: http://docs.python.org/2/library/logging.html