【mbed OS5対応バージョン】データの保存、更新、取得ができるWebサービス「milkcocoa」に接続し、データのプッシュ、送信、取得ができるライブラリです。 https://mlkcca.com/
Dependents: mbed-os-example-wifi-milkcocoa MilkcocoaOsSample_Eth MilkcocoaOsSample_ESP8266 MilkcocoaOsSample_Eth_DigitalIn
MQTT/MQTTLogging.h@13:61e0cc093180, 2018-03-26 (annotated)
- Committer:
- jksoft
- Date:
- Mon Mar 26 04:49:20 2018 +0000
- Revision:
- 13:61e0cc093180
- Parent:
- 0:0a2f634d3324
???????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:0a2f634d3324 | 1 | #if !defined(MQTT_LOGGING_H) |
jksoft | 0:0a2f634d3324 | 2 | #define MQTT_LOGGING_H |
jksoft | 0:0a2f634d3324 | 3 | |
jksoft | 0:0a2f634d3324 | 4 | #define STREAM stdout |
jksoft | 0:0a2f634d3324 | 5 | #if !defined(DEBUG) |
jksoft | 0:0a2f634d3324 | 6 | #define DEBUG(...) \ |
jksoft | 0:0a2f634d3324 | 7 | {\ |
jksoft | 0:0a2f634d3324 | 8 | fprintf(STREAM, "DEBUG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ |
jksoft | 0:0a2f634d3324 | 9 | fprintf(STREAM, ##__VA_ARGS__); \ |
jksoft | 0:0a2f634d3324 | 10 | fflush(STREAM); \ |
jksoft | 0:0a2f634d3324 | 11 | } |
jksoft | 0:0a2f634d3324 | 12 | #endif |
jksoft | 0:0a2f634d3324 | 13 | #if !defined(LOG) |
jksoft | 0:0a2f634d3324 | 14 | #define LOG(...) \ |
jksoft | 0:0a2f634d3324 | 15 | {\ |
jksoft | 0:0a2f634d3324 | 16 | fprintf(STREAM, "LOG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ |
jksoft | 0:0a2f634d3324 | 17 | fprintf(STREAM, ##__VA_ARGS__); \ |
jksoft | 0:0a2f634d3324 | 18 | fflush(STREAM); \ |
jksoft | 0:0a2f634d3324 | 19 | } |
jksoft | 0:0a2f634d3324 | 20 | #endif |
jksoft | 0:0a2f634d3324 | 21 | #if !defined(WARN) |
jksoft | 0:0a2f634d3324 | 22 | #define WARN(...) \ |
jksoft | 0:0a2f634d3324 | 23 | { \ |
jksoft | 0:0a2f634d3324 | 24 | fprintf(STREAM, "WARN: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ |
jksoft | 0:0a2f634d3324 | 25 | fprintf(STREAM, ##__VA_ARGS__); \ |
jksoft | 0:0a2f634d3324 | 26 | fflush(STREAM); \ |
jksoft | 0:0a2f634d3324 | 27 | } |
jksoft | 0:0a2f634d3324 | 28 | #endif |
jksoft | 0:0a2f634d3324 | 29 | #if !defined(ERROR) |
jksoft | 0:0a2f634d3324 | 30 | #define ERROR(...) \ |
jksoft | 0:0a2f634d3324 | 31 | { \ |
jksoft | 0:0a2f634d3324 | 32 | fprintf(STREAM, "ERROR: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ |
jksoft | 0:0a2f634d3324 | 33 | fprintf(STREAM, ##__VA_ARGS__); \ |
jksoft | 0:0a2f634d3324 | 34 | fflush(STREAM); \ |
jksoft | 0:0a2f634d3324 | 35 | exit(1); \ |
jksoft | 0:0a2f634d3324 | 36 | } |
jksoft | 0:0a2f634d3324 | 37 | #endif |
jksoft | 0:0a2f634d3324 | 38 | |
jksoft | 0:0a2f634d3324 | 39 | #endif |