pcsc-lite 1.9.8
Macros | Functions | Variables
debuglog.c File Reference

This handles debugging for pcscd. More...

#include "config.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include <pthread.h>
#include "pcsclite.h"
#include "misc.h"
#include "debuglog.h"
#include "sys_generic.h"

Go to the source code of this file.

Macros

#define DEBUG_BUF_SIZE   2048
 Max string size dumping a maxmium of 2 lines of 80 characters. More...
 
#define THREAD_FORMAT   "%lu"
 

Functions

static void log_line (const int priority, const char *DebugBuffer)
 
void log_msg (const int priority, const char *fmt,...)
 
static void log_xxd_always (const int priority, const char *msg, const unsigned char *buffer, const int len)
 
void log_xxd (const int priority, const char *msg, const unsigned char *buffer, const int len)
 
void DebugLogSetLogType (const int dbgtype)
 
void DebugLogSetLevel (const int level)
 
INTERNAL void DebugLogSetCategory (const int dbginfo)
 
INTERNAL void DebugLogCategory (const int category, const unsigned char *buffer, const int len)
 

Variables

static char LogMsgType = DEBUGLOG_NO_DEBUG
 
static char LogCategory = DEBUG_CATEGORY_NOTHING
 
static char LogLevel = PCSC_LOG_ERROR
 default level More...
 
static signed char LogDoColor = 0
 no color by default More...
 

Detailed Description

This handles debugging for pcscd.

Definition in file debuglog.c.

Macro Definition Documentation

◆ DEBUG_BUF_SIZE

#define DEBUG_BUF_SIZE   2048

Max string size dumping a maxmium of 2 lines of 80 characters.

Definition at line 103 of file debuglog.c.

Function Documentation

◆ DebugLogCategory()

INTERNAL void DebugLogCategory ( const int  category,
const unsigned char *  buffer,
const int  len 
)

Definition at line 321 of file debuglog.c.

◆ DebugLogSetCategory()

INTERNAL void DebugLogSetCategory ( const int  dbginfo)

Definition at line 307 of file debuglog.c.

◆ DebugLogSetLevel()

void DebugLogSetLevel ( const int  level)

Definition at line 282 of file debuglog.c.

◆ DebugLogSetLogType()

void DebugLogSetLogType ( const int  dbgtype)

Definition at line 240 of file debuglog.c.

◆ log_line()

static void log_line ( const int  priority,
const char *  DebugBuffer 
)
static

Definition at line 131 of file debuglog.c.

◆ log_msg()

void log_msg ( const int  priority,
const char *  fmt,
  ... 
)

Definition at line 115 of file debuglog.c.

◆ log_xxd()

void log_xxd ( const int  priority,
const char *  msg,
const unsigned char *  buffer,
const int  len 
)

Definition at line 226 of file debuglog.c.

◆ log_xxd_always()

static void log_xxd_always ( const int  priority,
const char *  msg,
const unsigned char *  buffer,
const int  len 
)
static

Definition at line 205 of file debuglog.c.

Variable Documentation

◆ LogCategory

char LogCategory = DEBUG_CATEGORY_NOTHING
static

Definition at line 106 of file debuglog.c.

◆ LogDoColor

signed char LogDoColor = 0
static

no color by default

Definition at line 111 of file debuglog.c.

◆ LogLevel

char LogLevel = PCSC_LOG_ERROR
static

default level

Definition at line 109 of file debuglog.c.

◆ LogMsgType

char LogMsgType = DEBUGLOG_NO_DEBUG
static

Definition at line 105 of file debuglog.c.