Skip to content

Commit

Permalink
* MDF [mqtt5_quic] delete old logging api
Browse files Browse the repository at this point in the history
Signed-off-by: jaylin <[email protected]>
  • Loading branch information
JaylinYu committed Jan 4, 2024
1 parent d7c16e6 commit a3a752d
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions src/mqtt/protocol/mqtt/mqttv5_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "supplemental/mqtt/mqtt_msg.h"
#include "supplemental/mqtt/mqtt_qos_db_api.h"
#include "supplemental/quic/quic_api.h"
#include "nng/supplemental/nanolib/log.h"

#define NNG_MQTT_SELF 0
#define NNG_MQTT_SELF_NAME "mqtt-client"
Expand Down Expand Up @@ -55,43 +56,6 @@ static int mqtt_sub_stream(mqtt_pipe_t *p, nni_msg *msg, uint16_t packet_id, nni
static void *mqtt_quic_sock_get_sqlite_option(mqtt_sock_t *s);
#endif

#define MQTT_PROTOCOL_V5_DEBUG 0

#if MQTT_PROTOCOL_V5_DEBUG
#define qdebug(fmt, ...) \
do { \
printf("[%s]: " fmt "", __FUNCTION__, ##__VA_ARGS__); \
} while (0)

#define log_debug(fmt, ...) \
do { \
printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \
} while (0)

#define log_info(fmt, ...) \
do { \
printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \
} while (0)

#define log_warn(fmt, ...) \
do { \
printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \
} while (0)

#define log_error(fmt, ...) \
do { \
printf("[%s]: " fmt "\n", __FUNCTION__, ##__VA_ARGS__); \
} while (0)

#else
#define qdebug(fmt, ...) do {} while(0)
#define log_debug(fmt, ...) do {} while(0)
#define log_info(fmt, ...) do {} while(0)
#define log_warn(fmt, ...) do {} while(0)
#define log_error(fmt, ...) do {} while(0)
#endif


//default QUIC config for define QUIC transport
static conf_quic config_default = {
.tls = {
Expand Down

0 comments on commit a3a752d

Please sign in to comment.