|
16 | 16 | #include "supplemental/mqtt/mqtt_msg.h" |
17 | 17 | #include "supplemental/mqtt/mqtt_qos_db_api.h" |
18 | 18 | #include "supplemental/quic/quic_api.h" |
| 19 | +#include "nng/supplemental/nanolib/log.h" |
19 | 20 |
|
20 | 21 | #define NNG_MQTT_SELF 0 |
21 | 22 | #define NNG_MQTT_SELF_NAME "mqtt-client" |
@@ -55,43 +56,6 @@ static int mqtt_sub_stream(mqtt_pipe_t *p, nni_msg *msg, uint16_t packet_id, nni |
55 | 56 | static void *mqtt_quic_sock_get_sqlite_option(mqtt_sock_t *s); |
56 | 57 | #endif |
57 | 58 |
|
58 | | -#define MQTT_PROTOCOL_V5_DEBUG 0 |
59 | | - |
60 | | -#if MQTT_PROTOCOL_V5_DEBUG |
61 | | -#define qdebug(fmt, ...) \ |
62 | | - do { \ |
63 | | - printf("[%s]: " fmt "", __FUNCTION__, ##__VA_ARGS__); \ |
64 | | - } while (0) |
65 | | - |
66 | | -#define log_debug(fmt, ...) \ |
67 | | - do { \ |
68 | | - printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \ |
69 | | - } while (0) |
70 | | - |
71 | | -#define log_info(fmt, ...) \ |
72 | | - do { \ |
73 | | - printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \ |
74 | | - } while (0) |
75 | | - |
76 | | -#define log_warn(fmt, ...) \ |
77 | | - do { \ |
78 | | - printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \ |
79 | | - } while (0) |
80 | | - |
81 | | -#define log_error(fmt, ...) \ |
82 | | - do { \ |
83 | | - printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \ |
84 | | - } while (0) |
85 | | - |
86 | | -#else |
87 | | -#define qdebug(fmt, ...) do {} while(0) |
88 | | -#define log_debug(fmt, ...) do {} while(0) |
89 | | -#define log_info(fmt, ...) do {} while(0) |
90 | | -#define log_warn(fmt, ...) do {} while(0) |
91 | | -#define log_error(fmt, ...) do {} while(0) |
92 | | -#endif |
93 | | - |
94 | | - |
95 | 59 | //default QUIC config for define QUIC transport |
96 | 60 | static conf_quic config_default = { |
97 | 61 | .tls = { |
|
0 commit comments