An API for using MQTT over multiple transports
Dependencies: FP MQTTPacket
Dependents: Cellular_HelloMQTT IoTStarterKit GSwifiInterface_HelloMQTT IBMIoTClientEthernetExample ... more
This library is part of the EclipseTM Paho project; specifically the embedded client.
The goals of this API are:
- to be independent of any system library: hence templates parameters for networking, timer and threading classes
- not to rely on heap storage, only automatic (I think this is a good thing)
- to limit memory use, for instance by defining the size of the buffers and arrays used at object creation time
MQTTLogging.h
- Committer:
- icraggs
- Date:
- 2017-10-03
- Revision:
- 56:71ae1a773b64
- Parent:
- 43:21da1f744243
File content as of revision 56:71ae1a773b64:
#if !defined(MQTT_LOGGING_H) #define MQTT_LOGGING_H #define STREAM stdout #if !defined(DEBUG) #define DEBUG(...) \ {\ fprintf(STREAM, "DEBUG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ fprintf(STREAM, ##__VA_ARGS__); \ fflush(STREAM); \ } #endif #if !defined(LOG) #define LOG(...) \ {\ fprintf(STREAM, "LOG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ fprintf(STREAM, ##__VA_ARGS__); \ fflush(STREAM); \ } #endif #if !defined(WARN) #define WARN(...) \ { \ fprintf(STREAM, "WARN: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ fprintf(STREAM, ##__VA_ARGS__); \ fflush(STREAM); \ } #endif #if !defined(ERROR) #define ERROR(...) \ { \ fprintf(STREAM, "ERROR: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ fprintf(STREAM, ##__VA_ARGS__); \ fflush(STREAM); \ exit(1); \ } #endif #endif