diff src/event/ngx_event_quic.h @ 8651:dbad2d6d1898 quic

QUIC: removed ngx_quic_hexdump() macro. Instead, appropriate format specifier for hexadecimal is used in ngx_log_debug(). The STREAM frame "data" debug is moved into ngx_quic_log_frame(), similar to all other frame fields debug.
author Vladimir Homutov <vl@nginx.com>
date Fri, 27 Nov 2020 18:43:36 +0300
parents 831d1960826f
children 2dfc5ef29973
line wrap: on
line diff
--- a/src/event/ngx_event_quic.h
+++ b/src/event/ngx_event_quic.h
@@ -138,30 +138,4 @@ ngx_int_t ngx_quic_get_packet_dcid(ngx_l
 /* #define NGX_QUIC_DEBUG_FRAMES_ALLOC */ /* log frames alloc/reuse/free */
 /* #define NGX_QUIC_DEBUG_CRYPTO */
 
-#if (NGX_DEBUG)
-
-#define ngx_quic_hexdump(log, fmt, data, len)                                 \
-    ngx_quic_hexdump_real(log, fmt, (u_char *) data, (size_t) len)
-
-static ngx_inline
-void ngx_quic_hexdump_real(ngx_log_t *log, const char *label, u_char *data,
-    size_t len)
-{
-    ngx_int_t  m;
-    u_char     buf[2048];
-
-    if (log->log_level & NGX_LOG_DEBUG_EVENT) {
-        m = ngx_hex_dump(buf, data, (len > 1024) ? 1024 : len) - buf;
-        ngx_log_debug5(NGX_LOG_DEBUG_EVENT, log, 0,
-                      "%s len:%uz data:%*s%s",
-                      label, len, m, buf, len < 2048 ? "" : "...");
-    }
-}
-
-#else
-
-#define ngx_quic_hexdump(log, fmt, data, len)
-
-#endif
-
 #endif /* _NGX_EVENT_QUIC_H_INCLUDED_ */