From 93c15f83b16554efb8e087f24e763da04568de8f Mon Sep 17 00:00:00 2001 From: fengzero Date: Tue, 21 Jun 2022 02:46:00 +0000 Subject: [PATCH] rename protocol log buf --- include/neuron/utils/log.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/neuron/utils/log.h b/include/neuron/utils/log.h index fbe51a5f..7c120319 100644 --- a/include/neuron/utils/log.h +++ b/include/neuron/utils/log.h @@ -65,26 +65,26 @@ extern zlog_category_t *neuron; sizeof(__func__) - 1, __LINE__, ZLOG_LEVEL_DEBUG, __VA_ARGS__) #define plog_send_protocol(plugin, bytes, n_byte) \ - char protocol_buf[2048] = { 0 }; \ - int offset = 0; \ - offset = snprintf(protocol_buf, sizeof(protocol_buf), ">>"); \ + char log_protocol_buf[2048] = { 0 }; \ + int offset = 0; \ + offset = snprintf(log_protocol_buf, sizeof(log_protocol_buf), ">>"); \ for (int i = 0; i < n_byte; i++) { \ - offset += \ - snprintf(protocol_buf + offset, sizeof(protocol_buf) - offset, \ - " 0x%02hhX", (bytes)[i]); \ + offset += snprintf(log_protocol_buf + offset, \ + sizeof(log_protocol_buf) - offset, " 0x%02hhX", \ + (bytes)[i]); \ } \ - plog_debug(plugin, "%s", protocol_buf); + plog_debug(plugin, "%s", log_protocol_buf); #define plog_recv_protocol(plugin, bytes, n_byte) \ - char protocol_buf[2048] = { 0 }; \ - int offset = 0; \ - offset = snprintf(protocol_buf, sizeof(protocol_buf), "<<"); \ + char log_protocol_buf[2048] = { 0 }; \ + int offset = 0; \ + offset = snprintf(log_protocol_buf, sizeof(log_protocol_buf), "<<"); \ for (int i = 0; i < n_byte; i++) { \ - offset += \ - snprintf(protocol_buf + offset, sizeof(protocol_buf) - offset, \ - " 0x%02hhX", (bytes)[i]); \ + offset += snprintf(log_protocol_buf + offset, \ + sizeof(log_protocol_buf) - offset, " 0x%02hhX", \ + (bytes)[i]); \ } \ - plog_debug(plugin, "%s", protocol_buf); + plog_debug(plugin, "%s", log_protocol_buf); #define zlog_recv_protocol(log, bytes, n_byte) \ char log_protocol_buf[2048] = { 0 }; \