Go to the documentation of this file.00001 #ifndef _CLOG
00002 #define _CLOG
00003
00011 typedef enum {
00012 PHIDGET_LOG_CRITICAL = 1,
00013 PHIDGET_LOG_ERROR,
00014 PHIDGET_LOG_WARNING,
00015 PHIDGET_LOG_DEBUG,
00016 PHIDGET_LOG_INFO,
00017 PHIDGET_LOG_VERBOSE
00018 } CPhidgetLog_level;
00019
00025 PHIDGET21_API int CCONV CPhidget_enableLogging(CPhidgetLog_level level, const char *outputFile);
00029 PHIDGET21_API int CCONV CPhidget_disableLogging();
00036 PHIDGET21_API int CCONV CPhidget_log(CPhidgetLog_level level, const char *id, const char *message, ...);
00037
00038 #ifndef EXTERNALPROTO
00039
00040 #define LOG_TO_STDERR 0x8000
00041 #define STRINGIFY(x) #x
00042 #define TOSTRING(x) STRINGIFY(x)
00043 #define LOG(level, ...) CPhidget_log(level, __FILE__ "(" TOSTRING(__LINE__) ")", __VA_ARGS__)
00044 #define LOG_STDERR(level, ...) CPhidget_log(LOG_TO_STDERR|level, __FILE__ "(" TOSTRING(__LINE__) ")", __VA_ARGS__)
00045
00046 extern CPhidgetLog_level logging_level;
00047
00048 #endif
00049
00052 #endif