Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

debuglog.h File Reference

This handles debugging. More...

Go to the source code of this file.

Defines

#define DEBUGLOG_LOG_ENTRIES   1
#define DEBUGLOG_IGNORE_ENTRIES   2
#define DEBUG_CATEGORY_NOTHING   0
#define DEBUG_CATEGORY_APDU   1
#define DEBUG_CATEGORY_SW   2
#define __FUNCTION__   ""
#define Log0(priority)   log_msg(priority, "%s:%d:%s()", __FILE__, __LINE__, __FUNCTION__)
#define Log1(priority, fmt)   log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__)
#define Log2(priority, fmt, data)   log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data)
#define Log3(priority, fmt, data1, data2)   log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2)
#define Log4(priority, fmt, data1, data2, data3)   log_msg(priority, "%s:%d:%s() " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2, data3)
#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)
#define LogXxd(priority, msg, buffer, size)   log_xxd(priority, msg, buffer, size)
#define DebugLogA(a)   Log1(PCSC_LOG_INFO, a)
#define DebugLogB(a, b)   Log2(PCSC_LOG_INFO, a, b)
#define DebugLogC(a, b, c)   Log3(PCSC_LOG_INFO, a, b, c)

Enumerations

enum  { DEBUGLOG_NO_DEBUG = 0, DEBUGLOG_SYSLOG_DEBUG, DEBUGLOG_STDERR_DEBUG }
enum  { PCSC_LOG_DEBUG = 0, PCSC_LOG_INFO, PCSC_LOG_ERROR, PCSC_LOG_CRITICAL }

Functions

PCSC_API void log_msg (const int priority, const char *fmt,...)
PCSC_API void log_xxd (const int priority, const char *msg, const unsigned char *buffer, const int size)
void DebugLogSuppress (const int)
void DebugLogSetLogType (const int)
int DebugLogSetCategory (const int)
void DebugLogCategory (const int, const unsigned char *, const int)
PCSC_API void DebugLogSetLevel (const int level)


Detailed Description

This handles debugging.

Note:
log message is sent to syslog or stderr depending on --foreground command line argument
Test:

Definition in file debuglog.h.


Generated on Wed Apr 2 17:42:52 2008 for pcsc-lite by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002