Skip to content

Commit 55f6901

Browse files
authored
Remove deprecated debug output functions from 21 source files. (#9683)
1 parent 39341bd commit 55f6901

21 files changed

+376
-267
lines changed

iocore/net/NetHandler.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ class NetHandler : public Continuation, public EThread::LoopTailHandler
223223

224224
NetHandler();
225225

226+
inline static DbgCtl dbg_ctl_socket{"socket"};
227+
inline static DbgCtl dbg_ctl_iocore_net{"iocore_net"};
228+
226229
private:
227230
void _close_ne(NetEvent *ne, ink_hrtime now, int &handle_event, int &closed, int &total_idle_time, int &total_idle_count);
228231

iocore/net/P_Net.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ static constexpr ts::ModuleVersion NET_SYSTEM_MODULE_INTERNAL_VERSION(NET_SYSTEM
108108

109109
// For very verbose iocore debugging.
110110
#ifndef DEBUG
111-
#define NetDebug(tag, fmt, ...)
111+
#define NetDbg(dbg_ctl, fmt, ...)
112112
#else
113-
#define NetDebug(tag, fmt, ...) Debug(tag, fmt, ##__VA_ARGS__)
113+
#define NetDbg(dbg_ctl, fmt, ...) Dbg(dbg_ctl, fmt, ##__VA_ARGS__)
114114
#endif
115115

116116
/// Default amount of buffer space to use for the initial read on an incoming connection.

iocore/net/P_NetAccept.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ struct NetAcceptAction : public Action, public RefCountObj {
7676
return Action::operator=(acont);
7777
}
7878

79-
~NetAcceptAction() override { Debug("net_accept", "NetAcceptAction dying"); }
79+
~NetAcceptAction() override
80+
{
81+
static DbgCtl dbg_ctl{"net_accept"};
82+
Dbg(dbg_ctl, "NetAcceptAction dying");
83+
}
8084
};
8185

8286
//

iocore/net/P_SNIActionPerformer.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ class ControlH2 : public ActionItem
7575
if (ssl_vc) {
7676
if (!enable_h2) {
7777
ssl_vc->disableProtocol(TS_ALPN_PROTOCOL_INDEX_HTTP_2_0);
78-
Debug("ssl_sni", "H2 disabled, fqdn [%s]", servername);
78+
Dbg(dbg_ctl_ssl_sni, "H2 disabled, fqdn [%s]", servername);
7979
} else {
8080
ssl_vc->enableProtocol(TS_ALPN_PROTOCOL_INDEX_HTTP_2_0);
81-
Debug("ssl_sni", "H2 enabled, fqdn [%s]", servername);
81+
Dbg(dbg_ctl_ssl_sni, "H2 enabled, fqdn [%s]", servername);
8282
}
8383
}
8484
return SSL_TLSEXT_ERR_OK;
@@ -179,7 +179,7 @@ class TunnelDestination : public ActionItem
179179
if (ssl_netvc) {
180180
if (fnArrIndexes.empty()) {
181181
ssl_netvc->set_tunnel_destination(destination, type, !TLSTunnelSupport::PORT_IS_DYNAMIC, tunnel_prewarm);
182-
Debug("ssl_sni", "Destination now is [%s], fqdn [%s]", destination.c_str(), servername);
182+
Dbg(dbg_ctl_ssl_sni, "Destination now is [%s], fqdn [%s]", destination.c_str(), servername);
183183
} else {
184184
bool port_is_dynamic = false;
185185
auto fixed_dst{destination};
@@ -189,7 +189,8 @@ class TunnelDestination : public ActionItem
189189
fixed_dst = fix_destination[fnArrIndex](fixed_dst, var_start_pos, ctx, ssl_netvc, port_is_dynamic);
190190
}
191191
ssl_netvc->set_tunnel_destination(fixed_dst, type, port_is_dynamic, tunnel_prewarm);
192-
Debug("ssl_sni", "Destination now is [%s], configured [%s], fqdn [%s]", fixed_dst.c_str(), destination.c_str(), servername);
192+
Dbg(dbg_ctl_ssl_sni, "Destination now is [%s], configured [%s], fqdn [%s]", fixed_dst.c_str(), destination.c_str(),
193+
servername);
193194
}
194195

195196
if (type == SNIRoutingType::BLIND) {
@@ -320,7 +321,7 @@ class VerifyClient : public ActionItem
320321
{
321322
auto ssl_vc = dynamic_cast<SSLNetVConnection *>(snis);
322323
const char *servername = snis->get_sni_server_name();
323-
Debug("ssl_sni", "action verify param %d, fqdn [%s]", this->mode, servername);
324+
Dbg(dbg_ctl_ssl_sni, "action verify param %d, fqdn [%s]", this->mode, servername);
324325
setClientCertLevel(ssl_vc->ssl, this->mode);
325326
ssl_vc->set_ca_cert_file(ca_file, ca_dir);
326327
setClientCertCACerts(ssl_vc->ssl, ssl_vc->get_ca_cert_file(), ssl_vc->get_ca_cert_dir());
@@ -388,15 +389,15 @@ class TLSValidProtocols : public ActionItem
388389
{
389390
if (this->min_ver >= 0 || this->max_ver >= 0) {
390391
const char *servername = snis->get_sni_server_name();
391-
Debug("ssl_sni", "TLSValidProtocol min=%d, max=%d, fqdn [%s]", this->min_ver, this->max_ver, servername);
392+
Dbg(dbg_ctl_ssl_sni, "TLSValidProtocol min=%d, max=%d, fqdn [%s]", this->min_ver, this->max_ver, servername);
392393
auto ssl_vc = dynamic_cast<SSLNetVConnection *>(snis);
393394
ssl_vc->set_valid_tls_version_min(this->min_ver);
394395
ssl_vc->set_valid_tls_version_max(this->max_ver);
395396
} else {
396397
if (!unset) {
397398
auto ssl_vc = dynamic_cast<SSLNetVConnection *>(snis);
398399
const char *servername = snis->get_sni_server_name();
399-
Debug("ssl_sni", "TLSValidProtocol param 0%x, fqdn [%s]", static_cast<unsigned int>(this->protocol_mask), servername);
400+
Dbg(dbg_ctl_ssl_sni, "TLSValidProtocol param 0%x, fqdn [%s]", static_cast<unsigned int>(this->protocol_mask), servername);
400401
ssl_vc->set_valid_tls_protocols(protocol_mask, TLSValidProtocols::max_mask);
401402
Warning("valid_tls_versions_in is deprecated. Use valid_tls_version_min_in and ivalid_tls_version_max_in instead.");
402403
}

iocore/net/P_UDPNet.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,12 @@ class PacketQueue
231231
}
232232
}
233233

234-
if (s != now_slot)
235-
Debug("v_udpnet-service", "Advancing by (%d slots): behind by %" PRId64 " ms", s - now_slot,
236-
ink_hrtime_to_msec(t - delivery_time[now_slot]));
234+
if (s != now_slot) {
235+
static DbgCtl dbg_ctl{"v_udpnet-service"};
236+
Dbg(dbg_ctl, "Advancing by (%d slots): behind by %" PRId64 " ms", s - now_slot,
237+
ink_hrtime_to_msec(t - delivery_time[now_slot]));
238+
}
239+
237240
now_slot = s;
238241
}
239242

iocore/net/P_UnixNet.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ read_disable(NetHandler *nh, NetEvent *ne)
232232
// Clear the next scheduled inactivity time, but don't clear inactivity_timeout_in,
233233
// so the current timeout is used when the NetEvent is reenabled and not the default inactivity timeout
234234
ne->next_inactivity_timeout_at = 0;
235-
Debug("socket", "read_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at, ne);
235+
Dbg(NetHandler::dbg_ctl_socket, "read_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at,
236+
ne);
236237
}
237238
ne->read.enabled = 0;
238239
nh->read_ready_list.remove(ne);
@@ -255,7 +256,8 @@ write_disable(NetHandler *nh, NetEvent *ne)
255256
// Clear the next scheduled inactivity time, but don't clear inactivity_timeout_in,
256257
// so the current timeout is used when the NetEvent is reenabled and not the default inactivity timeout
257258
ne->next_inactivity_timeout_at = 0;
258-
Debug("socket", "write_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at, ne);
259+
Dbg(NetHandler::dbg_ctl_socket, "write_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at,
260+
ne);
259261
}
260262
ne->write.enabled = 0;
261263
nh->write_ready_list.remove(ne);

iocore/net/P_UnixNetVConnection.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ class UnixNetVConnection : public NetVConnection, public NetEvent
228228
private:
229229
virtual void *_prepareForMigration();
230230
virtual NetProcessor *_getNetProcessor();
231+
232+
inline static DbgCtl _dbg_ctl_socket{"socket"};
233+
inline static DbgCtl _dbg_ctl_socket_mptcp{"socket_mptcp"};
231234
};
232235

233236
extern ClassAllocator<UnixNetVConnection> netVCAllocator;
@@ -268,10 +271,10 @@ UnixNetVConnection::set_mptcp_state()
268271
int mptcp_enabled_size = sizeof(mptcp_enabled);
269272

270273
if (0 == safe_getsockopt(con.fd, IPPROTO_TCP, MPTCP_ENABLED, (char *)&mptcp_enabled, &mptcp_enabled_size)) {
271-
Debug("socket_mptcp", "MPTCP socket state: %d", mptcp_enabled);
274+
Dbg(_dbg_ctl_socket_mptcp, "MPTCP socket state: %d", mptcp_enabled);
272275
mptcp_state = mptcp_enabled > 0 ? true : false;
273276
} else {
274-
Debug("socket_mptcp", "MPTCP failed getsockopt(): %s", strerror(errno));
277+
Dbg(_dbg_ctl_socket_mptcp, "MPTCP failed getsockopt(): %s", strerror(errno));
275278
}
276279
}
277280

@@ -290,23 +293,23 @@ UnixNetVConnection::get_inactivity_timeout()
290293
inline void
291294
UnixNetVConnection::set_active_timeout(ink_hrtime timeout_in)
292295
{
293-
Debug("socket", "Set active timeout=%" PRId64 ", NetVC=%p", timeout_in, this);
296+
Dbg(_dbg_ctl_socket, "Set active timeout=%" PRId64 ", NetVC=%p", timeout_in, this);
294297
active_timeout_in = timeout_in;
295298
next_activity_timeout_at = (active_timeout_in > 0) ? ink_get_hrtime() + timeout_in : 0;
296299
}
297300

298301
inline void
299302
UnixNetVConnection::cancel_inactivity_timeout()
300303
{
301-
Debug("socket", "Cancel inactive timeout for NetVC=%p", this);
304+
Dbg(_dbg_ctl_socket, "Cancel inactive timeout for NetVC=%p", this);
302305
inactivity_timeout_in = 0;
303306
next_inactivity_timeout_at = 0;
304307
}
305308

306309
inline void
307310
UnixNetVConnection::cancel_active_timeout()
308311
{
309-
Debug("socket", "Cancel active timeout for NetVC=%p", this);
312+
Dbg(_dbg_ctl_socket, "Cancel active timeout for NetVC=%p", this);
310313
active_timeout_in = 0;
311314
next_activity_timeout_at = 0;
312315
}

iocore/net/PollCont.cc

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
#include "PollCont.h"
2626
#include "P_Net.h"
2727

28+
namespace
29+
{
30+
#ifdef DEBUG
31+
32+
DbgCtl dbg_ctl_iocore_net_poll{"iocore_net_poll"};
33+
DbgCtl dbg_ctl_v_iocore_net_poll{"v_iocore_net_poll"};
34+
35+
#endif
36+
} // end anonymous namespace
37+
2838
PollCont::PollCont(Ptr<ProxyMutex> &m, int pt)
2939
: Continuation(m.get()), net_handler(nullptr), nextPollDescriptor(nullptr), poll_timeout(pt)
3040
{
@@ -66,9 +76,8 @@ PollCont::do_poll(ink_hrtime timeout)
6676
* read or write) that need processing [ebalsa] */
6777
if (likely(!net_handler->read_ready_list.empty() || !net_handler->write_ready_list.empty() ||
6878
!net_handler->read_enable_list.empty() || !net_handler->write_enable_list.empty())) {
69-
NetDebug("iocore_net_poll", "rrq: %d, wrq: %d, rel: %d, wel: %d", net_handler->read_ready_list.empty(),
70-
net_handler->write_ready_list.empty(), net_handler->read_enable_list.empty(),
71-
net_handler->write_enable_list.empty());
79+
NetDbg(dbg_ctl_iocore_net_poll, "rrq: %d, wrq: %d, rel: %d, wel: %d", net_handler->read_ready_list.empty(),
80+
net_handler->write_ready_list.empty(), net_handler->read_enable_list.empty(), net_handler->write_enable_list.empty());
7281
poll_timeout = 0; // poll immediately returns -- we have triggered stuff
7382
// to process right now
7483
} else if (timeout >= 0) {
@@ -81,15 +90,15 @@ PollCont::do_poll(ink_hrtime timeout)
8190
#if TS_USE_EPOLL
8291
pollDescriptor->result =
8392
epoll_wait(pollDescriptor->epoll_fd, pollDescriptor->ePoll_Triggered_Events, POLL_DESCRIPTOR_SIZE, poll_timeout);
84-
NetDebug("v_iocore_net_poll", "[PollCont::pollEvent] epoll_fd: %d, timeout: %d, results: %d", pollDescriptor->epoll_fd,
85-
poll_timeout, pollDescriptor->result);
93+
NetDbg(dbg_ctl_v_iocore_net_poll, "[PollCont::pollEvent] epoll_fd: %d, timeout: %d, results: %d", pollDescriptor->epoll_fd,
94+
poll_timeout, pollDescriptor->result);
8695
#elif TS_USE_KQUEUE
8796
struct timespec tv;
8897
tv.tv_sec = poll_timeout / 1000;
8998
tv.tv_nsec = 1000000 * (poll_timeout % 1000);
9099
pollDescriptor->result =
91100
kevent(pollDescriptor->kqueue_fd, nullptr, 0, pollDescriptor->kq_Triggered_Events, POLL_DESCRIPTOR_SIZE, &tv);
92-
NetDebug("v_iocore_net_poll", "[PollCont::pollEvent] kqueue_fd: %d, timeout: %d, results: %d", pollDescriptor->kqueue_fd,
93-
poll_timeout, pollDescriptor->result);
101+
NetDbg(dbg_ctl_v_iocore_net_poll, "[PollCont::pollEvent] kqueue_fd: %d, timeout: %d, results: %d", pollDescriptor->kqueue_fd,
102+
poll_timeout, pollDescriptor->result);
94103
#endif
95104
}

iocore/net/QUICNetProcessor.cc

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@
3939

4040
QUICNetProcessor quic_NetProcessor;
4141

42+
namespace
43+
{
44+
45+
DbgCtl dbg_ctl_quic_ps{"quic_ps"};
46+
DbgCtl dbg_ctl_udpnet{"udpnet"};
47+
DbgCtl dbg_ctl_iocore_net_processor{"iocore_net_processor"};
48+
49+
} // end anonymous namespace
50+
4251
QUICNetProcessor::QUICNetProcessor() {}
4352

4453
QUICNetProcessor::~QUICNetProcessor()
@@ -68,7 +77,7 @@ QUICNetProcessor::start(int, size_t stacksize)
6877

6978
#ifdef TLS1_3_VERSION_DRAFT_TXT
7079
// FIXME: remove this when TLS1_3_VERSION_DRAFT_TXT is removed
71-
Debug("quic_ps", "%s", TLS1_3_VERSION_DRAFT_TXT);
80+
Dbg(dbg_ctl_quick_ps, "%s", TLS1_3_VERSION_DRAFT_TXT);
7281
#endif
7382

7483
return 0;
@@ -107,7 +116,7 @@ QUICNetProcessor::allocate_vc(EThread *t)
107116
Action *
108117
QUICNetProcessor::connect_re(Continuation *cont, sockaddr const *remote_addr, NetVCOptions const &opt)
109118
{
110-
Debug("quic_ps", "connect to server");
119+
Dbg(dbg_ctl_quick_ps, "connect to server");
111120
EThread *t = cont->mutex->thread_holding;
112121
ink_assert(t);
113122
QUICNetVConnection *vc = static_cast<QUICNetVConnection *>(this->allocate_vc(t));
@@ -124,7 +133,7 @@ QUICNetProcessor::connect_re(Continuation *cont, sockaddr const *remote_addr, Ne
124133

125134
// Setup UDPConnection
126135
UnixUDPConnection *con = new UnixUDPConnection(fd);
127-
Debug("quic_ps", "con=%p fd=%d", con, fd);
136+
Dbg(dbg_ctl_quick_ps, "con=%p fd=%d", con, fd);
128137

129138
this->_rtable = new QUICResetTokenTable();
130139
QUICPacketHandlerOut *packet_handler = new QUICPacketHandlerOut(*this->_rtable);
@@ -139,7 +148,7 @@ QUICNetProcessor::connect_re(Continuation *cont, sockaddr const *remote_addr, Ne
139148
errno = 0;
140149
int res = con->ep.start(pd, con, EVENTIO_READ);
141150
if (res < 0) {
142-
Debug("udpnet", "Error: %s (%d)", strerror(errno), errno);
151+
Dbg(dbg_ctl_udpnet, "Error: %s (%d)", strerror(errno), errno);
143152
}
144153

145154
// Setup QUICNetVConnection
@@ -182,8 +191,8 @@ Action *
182191
QUICNetProcessor::main_accept(Continuation *cont, SOCKET fd, AcceptOptions const &opt)
183192
{
184193
// UnixNetProcessor *this_unp = static_cast<UnixNetProcessor *>(this);
185-
Debug("iocore_net_processor", "NetProcessor::main_accept - port %d,recv_bufsize %d, send_bufsize %d, sockopt 0x%0x",
186-
opt.local_port, opt.recv_bufsize, opt.send_bufsize, opt.sockopt_flags);
194+
Dbg(dbg_ctl_iocore_net_processor, "NetProcessor::main_accept - port %d,recv_bufsize %d, send_bufsize %d, sockopt 0x%0x",
195+
opt.local_port, opt.recv_bufsize, opt.send_bufsize, opt.sockopt_flags);
187196

188197
ProxyMutex *mutex = this_ethread()->mutex.get();
189198
int accept_threads = opt.accept_threads; // might be changed.

iocore/net/QUICPacketHandler.cc

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,22 @@
3737
#include "QUICMultiCertConfigLoader.h"
3838
#include "QUICTLS.h"
3939

40-
static constexpr char debug_tag[] = "quic_sec";
41-
static constexpr char v_debug_tag[] = "v_quic_sec";
40+
namespace
41+
{
42+
43+
DbgCtl dbg_ctl{"quic_sec"};
44+
DbgCtl dbg_ctl_v{"v_quic_sec"};
45+
DbgCtl dbg_ctl_quick_ph{"quic_ph"};
46+
47+
} // end anonymous namespace
4248

43-
#define QUICDebug(fmt, ...) Debug(debug_tag, fmt, ##__VA_ARGS__)
44-
#define QUICQCDebug(qc, fmt, ...) Debug(debug_tag, "[%s] " fmt, qc->cids().data(), ##__VA_ARGS__)
49+
#define QUICDebug(fmt, ...) Dbg(dbg_ctl, fmt, ##__VA_ARGS__)
50+
#define QUICQCDebug(qc, fmt, ...) Dbg(dbg_ctl, "[%s] " fmt, qc->cids().data(), ##__VA_ARGS__)
4551

4652
// ["local dcid" - "local scid"]
47-
#define QUICPHDebug(dcid, scid, fmt, ...) \
48-
Debug(debug_tag, "[%08" PRIx32 "-%08" PRIx32 "] " fmt, dcid.h32(), scid.h32(), ##__VA_ARGS__)
53+
#define QUICPHDebug(dcid, scid, fmt, ...) Dbg(dbg_ctl, "[%08" PRIx32 "-%08" PRIx32 "] " fmt, dcid.h32(), scid.h32(), ##__VA_ARGS__)
4954
#define QUICVPHDebug(dcid, scid, fmt, ...) \
50-
Debug(v_debug_tag, "[%08" PRIx32 "-%08" PRIx32 "] " fmt, dcid.h32(), scid.h32(), ##__VA_ARGS__)
55+
Dbg(dbg_ctl_v, "[%08" PRIx32 "-%08" PRIx32 "] " fmt, dcid.h32(), scid.h32(), ##__VA_ARGS__)
5156

5257
//
5358
// QUICPacketHandler
@@ -102,7 +107,7 @@ QUICPacketHandler::_send_packet(UDPConnection *udp_con, IpEndpoint &addr, Ptr<IO
102107
{
103108
UDPPacket *udp_packet = UDPPacket::new_UDPPacket(addr, 0, udp_payload);
104109

105-
if (is_debug_tag_set(v_debug_tag)) {
110+
if (dbg_ctl_v.on()) {
106111
ip_port_text_buffer ipb;
107112
QUICConnectionId dcid = QUICConnectionId::ZERO();
108113
QUICConnectionId scid = QUICConnectionId::ZERO();
@@ -257,7 +262,7 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
257262
return;
258263
}
259264

260-
if (is_debug_tag_set(v_debug_tag)) {
265+
if (dbg_ctl_v.on()) {
261266
ip_port_text_buffer ipb_from;
262267
ip_port_text_buffer ipb_to;
263268
QUICVPHDebug(scid, dcid, "recv LH packet from %s to %s size=%" PRId64,
@@ -299,7 +304,7 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
299304
}
300305
} else {
301306
// TODO: lookup DCID by 5-tuple when ATS omits SCID
302-
if (is_debug_tag_set(v_debug_tag)) {
307+
if (dbg_ctl_v.on()) {
303308
ip_port_text_buffer ipb_from;
304309
ip_port_text_buffer ipb_to;
305310
QUICVPHDebug(scid, dcid, "recv SH packet from %s to %s size=%" PRId64,
@@ -339,7 +344,7 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
339344
this->_send_stateless_reset(dcid, params->instance_id(), udp_packet->getConnection(), udp_packet->from, buf_len - 1);
340345
udp_packet->free();
341346

342-
if (is_debug_tag_set(debug_tag) && sent) {
347+
if (dbg_ctl.on() && sent) {
343348
QUICPHDebug(scid, dcid, "sent Stateless Reset : connection not found, dcid=%s", dcid.hex().c_str());
344349
}
345350

@@ -350,7 +355,7 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
350355
this->_send_stateless_reset(dcid, params->instance_id(), udp_packet->getConnection(), udp_packet->from, buf_len - 1);
351356
udp_packet->free();
352357

353-
if (is_debug_tag_set(debug_tag) && sent) {
358+
if (dbg_ctl.on() && sent) {
354359
QUICPHDebug(scid, dcid, "sent Stateless Reset : connection is already closed, dcid=%s", dcid.hex().c_str());
355360
}
356361

@@ -367,7 +372,7 @@ QUICPacketHandlerIn::_recv_packet(int event, UDPPacket *udp_packet)
367372
QUICConnectionId original_cid = dcid;
368373
QUICConnectionId peer_cid = scid;
369374

370-
if (is_debug_tag_set("quic_sec")) {
375+
if (dbg_ctl.on()) {
371376
QUICPHDebug(peer_cid, original_cid, "client initial dcid=%s", original_cid.hex().c_str());
372377
}
373378

@@ -555,7 +560,7 @@ QUICPacketHandlerOut::event_handler(int event, Event *data)
555560
return EVENT_CONT;
556561
}
557562
default:
558-
Debug("quic_ph", "Unknown Event (%d)", event);
563+
Dbg(dbg_ctl_quic_ph, "Unknown Event (%d)", event);
559564

560565
break;
561566
}
@@ -576,7 +581,7 @@ QUICPacketHandlerOut::_recv_packet(int event, UDPPacket *udp_packet)
576581
const uint8_t *buf = reinterpret_cast<uint8_t *>(block->buf());
577582
uint64_t buf_len = block->size();
578583

579-
if (is_debug_tag_set(debug_tag)) {
584+
if (dbg_ctl.on()) {
580585
ip_port_text_buffer ipb_from;
581586
ip_port_text_buffer ipb_to;
582587
QUICQCDebug(this->_vc, "recv %s packet from %s to %s size=%" PRId64, (QUICInvariants::is_long_header(buf) ? "LH" : "SH"),

0 commit comments

Comments
 (0)