126 void twLogHexString(
const char * msg,
char * preamble, int32_t length);
char * twCodeToString(enum msgCodeEnum m)
Helper function to convert a msgCodeEnum to a string.
Definition: twLogger.c:111
char isVerbose
Definition: twLogger.h:53
void(* log_function)(enum LogLevel level, const char *timestamp, const char *message)
Signature for logging function to be called when twLog() is invoked.
Definition: twLogger.h:45
TW_MUTEX mtx
Definition: twLogger.h:55
void twLogHexString(const char *msg, char *preamble, int32_t length)
Logs a hex string message.
Definition: twLogger.c:420
ThingWorx C SDK error code definitions.
Definition: twLogger.h:30
char * twCharacteristicToString(enum characteristicEnum m)
Helper function to convert a characteristicEnum to a string.
Definition: twLogger.c:179
#define TW_MUTEX
For Linux builds a TW_MUTEX is a pthread_mutex_t.
Definition: twLinux-openssl.h:81
int twLogger_Delete()
Frees all memory associated with the twLogger singleton.
Definition: twLogger.c:53
Definition: twLogger.h:28
Definition: twLogger.h:31
int twLogger_SetIsVerbose(char val)
Sets the twLogger::isVerbose flag of the twLogger singleton.
Definition: twLogger.c:80
Wrappers for OS-specific functionality.
ThingWorx Logger singleton structure definition.
Definition: twLogger.h:50
log_function f
Definition: twLogger.h:52
int twLogger_SetFunction(log_function f)
Sets the ::twLogger#log_function of the twLogger singleton.
Definition: twLogger.c:72
Definition: twLogger.h:33
LogLevel
Log message level enumeration.
Definition: twLogger.h:26
struct twLogger twLogger
ThingWorx Logger singleton structure definition.
entityTypeEnum
Definition: twDefinitions.h:113
Definition: twLogger.h:27
msgCodeEnum
Enumeration of HTTP message codes.
Definition: twDefinitions.h:74
char * buffer
Definition: twLogger.h:54
characteristicEnum
Definition: twDefinitions.h:146
twLogger * twLogger_Instance()
Gets a pointer to the twLogger singleton and creates a new one if it hasn't been created already...
Definition: twLogger.c:39
int twLogger_SetLevel(enum LogLevel level)
Sets the ::twLogger#LogLevel of the twLogger singleton.
Definition: twLogger.c:64
Definition: twLogger.h:29
enum LogLevel level
Definition: twLogger.h:51
Definition: twLogger.h:32
void twLogMessage(void *m, char *preamble)
Logs a generic string message.
Definition: twLogger.c:388
void twLog(enum LogLevel level, const char *format,...)
Logs a message.
Definition: twLogger.c:88
char * twEntityToString(enum entityTypeEnum m)
Helper function to convert a entityTypeEnum to a string.
Definition: twLogger.c:166