62 DEBUGLOG_NO_DEBUG = 0,
63 DEBUGLOG_SYSLOG_DEBUG,
64 DEBUGLOG_STDOUT_DEBUG,
65 DEBUGLOG_STDOUT_COLOR_DEBUG
68#define DEBUG_CATEGORY_NOTHING 0
69#define DEBUG_CATEGORY_APDU 1
70#define DEBUG_CATEGORY_SW 2
80#if !defined(__GNUC__) && !defined(__IBMC__)
81#define __FUNCTION__ ""
85#define __attribute__(x)
90#define Log0(priority) do { } while(0)
91#define Log1(priority, fmt) do { } while(0)
92#define Log2(priority, fmt, data) do {(void)priority; } while(0)
93#define Log3(priority, fmt, data1, data2) do {int _p = priority; (void)_p; } while(0)
94#define Log4(priority, fmt, data1, data2, data3) do { } while(0)
95#define LogRv4(priority, rv, fmt, data1, data2) do { } while(0)
96#define Log5(priority, fmt, data1, data2, data3, data4) do { } while(0)
97#define Log9(priority, fmt, data1, data2, data3, data4, data5, data6, data7, data8) do { } while(0)
98#define LogXxd(priority, msg, buffer, size) do { } while(0)
102#define DebugLogB(a, b)
103#define DebugLogC(a, b,c)
107#define Log0(priority) log_msg(priority, "%s:%d:%s()", __FILE__, __LINE__, __FUNCTION__)
108#define Log1(priority, fmt) log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__)
109#define Log2(priority, fmt, data) log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data)
110#define Log3(priority, fmt, data1, data2) log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2)
111#define Log4(priority, fmt, data1, data2, data3) log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2, data3)
112#define LogRv4(priority, rv, fmt, data1, data2) log_msg_rv(priority, rv, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2)
113#define Log5(priority, fmt, data1, data2, data3, data4) log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2, data3, data4)
114#define Log9(priority, fmt, data1, data2, data3, data4, data5, data6, data7, data8) log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2, data3, data4, data5, data6, data7, data8)
115#define LogXxd(priority, msg, buffer, size) log_xxd(priority, msg, buffer, size)
116const char * rv2text(
unsigned int rv);
118#define DebugLogA(a) Log1(PCSC_LOG_INFO, a)
119#define DebugLogB(a, b) Log2(PCSC_LOG_INFO, a, b)
120#define DebugLogC(a, b,c) Log3(PCSC_LOG_INFO, a, b, c)
124PCSC_API
void log_msg_rv(
const int priority,
unsigned int rv,
const char *fmt, ...)
125 __attribute__((format(printf, 3, 4)));
127PCSC_API
void log_msg(const
int priority, const
char *fmt, ...)
128 __attribute__((format(printf, 2, 3)));
130PCSC_API
void log_xxd(const
int priority, const
char *msg,
131 const
unsigned char *buffer, const
int size);
133void DebugLogSuppress(const
int);
134void DebugLogSetLogType(const
int);
135void DebugLogSetCategory(const
int);
136void DebugLogCategory(const
int, const
unsigned char *, const
int);
137PCSC_API
void DebugLogSetLevel(const
int level);