Defines | Enumerations | Functions | Variables
Phidget Logging

Defines

#define LOG(level,...)   CPhidget_log(level, __FILE__ "(" TOSTRING(__LINE__) ")", __VA_ARGS__)
#define LOG_STDERR(level,...)   CPhidget_log(LOG_TO_STDERR|level, __FILE__ "(" TOSTRING(__LINE__) ")", __VA_ARGS__)
#define LOG_TO_STDERR   0x8000
#define STRINGIFY(x)   #x
#define TOSTRING(x)   STRINGIFY(x)

Enumerations

enum  CPhidgetLog_level {
  PHIDGET_LOG_CRITICAL = 1, PHIDGET_LOG_ERROR, PHIDGET_LOG_WARNING, PHIDGET_LOG_DEBUG,
  PHIDGET_LOG_INFO, PHIDGET_LOG_VERBOSE, PHIDGET_LOG_CRITICAL = 1, PHIDGET_LOG_ERROR,
  PHIDGET_LOG_WARNING, PHIDGET_LOG_DEBUG, PHIDGET_LOG_INFO, PHIDGET_LOG_VERBOSE
}

Functions

PHIDGET21_API int CCONV CPhidget_disableLogging ()
PHIDGET21_API int CCONV CPhidget_enableLogging (CPhidgetLog_level level, const char *outputFile)
PHIDGET21_API int CCONV CPhidget_log (CPhidgetLog_level level, const char *id, const char *message,...)

Variables

CPhidgetLog_level logging_level

Detailed Description

Logging is provided mainly for debugging purposes. Enabling logging will output internal library information that can be used to find bugs with the help of Phidgetd Inc. Alternatively, the user can enable and write to the log for their own uses.


Define Documentation

#define LOG (   level,
  ... 
)    CPhidget_log(level, __FILE__ "(" TOSTRING(__LINE__) ")", __VA_ARGS__)

Definition at line 43 of file clog.h.

#define LOG_STDERR (   level,
  ... 
)    CPhidget_log(LOG_TO_STDERR|level, __FILE__ "(" TOSTRING(__LINE__) ")", __VA_ARGS__)

Definition at line 44 of file clog.h.

#define LOG_TO_STDERR   0x8000

Definition at line 40 of file clog.h.

#define STRINGIFY (   x)    #x

Definition at line 41 of file clog.h.

#define TOSTRING (   x)    STRINGIFY(x)

Definition at line 42 of file clog.h.


Enumeration Type Documentation

Enumerator:
PHIDGET_LOG_CRITICAL 

Really important errors that can't be recovered. Usually followed by an abort()

PHIDGET_LOG_ERROR 

Errors that are recovered from.

PHIDGET_LOG_WARNING 

Warning's about weird things that aren't neccesarily wrong.

PHIDGET_LOG_DEBUG 

Should only be used during development - only shows up in the debug library.

PHIDGET_LOG_INFO 

Info about the going on's in the library.

PHIDGET_LOG_VERBOSE 

Everything, including very common messages.

PHIDGET_LOG_CRITICAL 
PHIDGET_LOG_ERROR 
PHIDGET_LOG_WARNING 
PHIDGET_LOG_DEBUG 
PHIDGET_LOG_INFO 
PHIDGET_LOG_VERBOSE 

Definition at line 11 of file clog.h.


Function Documentation

Disables logging.

Definition at line 66 of file clog.c.

PHIDGET21_API int CCONV CPhidget_enableLogging ( CPhidgetLog_level  level,
const char *  outputFile 
)

Enables logging.

Parameters:
levelThe highest level of logging to output. All lower levels will also be output.
outputFileFile to output log to. This should be a full pathname, not a relative pathname. Specify NULL to output to stdout.

Definition at line 31 of file clog.c.

PHIDGET21_API int CCONV CPhidget_log ( CPhidgetLog_level  level,
const char *  id,
const char *  message,
  ... 
)

Appends a message to the log.

Parameters:
levelThe level at which to log the message.
idAn arbitrary identifier.
messageThe message (printf style).

WINCE

Definition at line 85 of file clog.c.


Variable Documentation

Definition at line 5 of file clog.c.



pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:22