Phidget Logging


Enumerations

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

Functions

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

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.

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.


Function Documentation

int CPhidget_enableLogging ( CPhidgetLog_level  level,
const char *  outputFile 
)

Enables logging.

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

int CPhidget_disableLogging (  ) 

Disables logging.

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

Appends a message to the log.

Parameters:
level The level at which to log the message.
id An arbitrary identifier.
message The message (printf style).


Generated on Wed Jan 5 12:08:42 2022 for Phidget21 by  doxygen 1.5.9