This handles debugging for pcscd.
More...
#include "config.h"
#include <syslog.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.
|
#define | DEBUG_BUF_SIZE 2048 |
| Max string size dumping a maximum of 2 lines of 80 characters.
|
|
#define | CASE(x) |
|
#define | THREAD_FORMAT "%p" |
|
|
static void | log_line (const int priority, const char *DebugBuffer, unsigned int rv) |
|
void | log_msg_rv (const int priority, unsigned int rv, const char *fmt,...) |
|
void | log_msg (const int priority, const char *fmt,...) |
|
const char * | rv2text (unsigned int rv) |
|
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) |
|
|
static char | LogMsgType = DEBUGLOG_NO_DEBUG |
|
static char | LogCategory = DEBUG_CATEGORY_NOTHING |
|
static char | LogLevel = PCSC_LOG_ERROR |
| default level
|
|
static signed char | LogDoColor = 0 |
| no color by default
|
|
static pthread_mutex_t | LastTimeMutex = PTHREAD_MUTEX_INITIALIZER |
|
This handles debugging for pcscd.
Definition in file debuglog.c.
◆ CASE
Value: case x: \
rv_text = "rv=" #x; \
break
◆ DEBUG_BUF_SIZE
#define DEBUG_BUF_SIZE 2048 |
Max string size dumping a maximum of 2 lines of 80 characters.
Definition at line 101 of file debuglog.c.
◆ DebugLogCategory()
INTERNAL void DebugLogCategory |
( |
const int | category, |
|
|
const unsigned char * | buffer, |
|
|
const int | len ) |
◆ DebugLogSetCategory()
INTERNAL void DebugLogSetCategory |
( |
const int | dbginfo | ) |
|
◆ DebugLogSetLevel()
void DebugLogSetLevel |
( |
const int | level | ) |
|
◆ DebugLogSetLogType()
void DebugLogSetLogType |
( |
const int | dbgtype | ) |
|
◆ log_line()
static void log_line |
( |
const int | priority, |
|
|
const char * | DebugBuffer, |
|
|
unsigned int | rv ) |
|
static |
◆ log_msg()
void log_msg |
( |
const int | priority, |
|
|
const char * | fmt, |
|
|
| ... ) |
◆ log_msg_rv()
void log_msg_rv |
( |
const int | priority, |
|
|
unsigned int | rv, |
|
|
const char * | fmt, |
|
|
| ... ) |
◆ log_xxd()
void log_xxd |
( |
const int | priority, |
|
|
const char * | msg, |
|
|
const unsigned char * | buffer, |
|
|
const int | len ) |
◆ log_xxd_always()
static void log_xxd_always |
( |
const int | priority, |
|
|
const char * | msg, |
|
|
const unsigned char * | buffer, |
|
|
const int | len ) |
|
static |
◆ rv2text()
const char * rv2text |
( |
unsigned int | rv | ) |
|
◆ LastTimeMutex
pthread_mutex_t LastTimeMutex = PTHREAD_MUTEX_INITIALIZER |
|
static |
◆ LogCategory
char LogCategory = DEBUG_CATEGORY_NOTHING |
|
static |
◆ LogDoColor
signed char LogDoColor = 0 |
|
static |
◆ LogLevel
char LogLevel = PCSC_LOG_ERROR |
|
static |
◆ LogMsgType
char LogMsgType = DEBUGLOG_NO_DEBUG |
|
static |