Commit fd3993e1 authored by Jan Včelák's avatar Jan Včelák 🚀

fix dbg_* functions to use the new logging API

parent cbd1a88d
......@@ -64,8 +64,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_ns(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_ns_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_ns(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_ns_hex(data, len) hex_log((data), (len))
#define dbg_ns_exec(cmds) do { cmds } while (0)
#else
#define dbg_ns(msg...)
......@@ -75,8 +75,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_ns_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_ns_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_ns_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_ns_hex_verb(data, len) hex_log((data), (len))
#define dbg_ns_exec_verb(cmds) do { cmds } while (0)
#else
#define dbg_ns_verb(msg...)
......@@ -86,8 +86,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_ns_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_ns_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_ns_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_ns_hex_detail(data, len) hex_log((data), (len))
#define dbg_ns_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_ns_detail(msg...)
......@@ -114,8 +114,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_zone(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_zone_hex(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_zone(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_zone_hex(data, len) hex_log((data), (len))
#define dbg_zone_exec(cmds) do { cmds } while (0)
#else
#define dbg_zone(msg...)
......@@ -125,8 +125,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_zone_verb(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_zone_hex_verb(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_zone_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_zone_hex_verb(data, len) hex_log((data), (len))
#define dbg_zone_exec_verb(cmds) do { cmds } while (0)
#else
#define dbg_zone_verb(msg...)
......@@ -136,8 +136,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_zone_detail(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_zone_hex_detail(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_zone_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_zone_hex_detail(data, len) hex_log((data), (len))
#define dbg_zone_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_zone_detail(msg...)
......@@ -208,8 +208,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_response(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_response_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_response(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_response_hex(data, len) hex_log((data), (len))
#define dbg_response_exec(cmds) do { cmds } while (0)
#else
#define dbg_response(msg...)
......@@ -219,8 +219,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_response_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_response_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_response_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_response_hex_verb(data, len) hex_log((data), (len))
#define dbg_response_exec_verb(cmds) do { cmds } while (0)
#else
#define dbg_response_verb(msg...)
......@@ -230,8 +230,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_response_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_response_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_response_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_response_hex_detail(data, len) hex_log((data), (len))
#define dbg_response_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_response_detail(msg...)
......@@ -258,8 +258,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_packet(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_packet_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_packet(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_packet_hex(data, len) hex_log((data), (len))
#define dbg_packet_exec(cmds) do { cmds } while (0)
#else
#define dbg_packet(msg...)
......@@ -269,8 +269,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_packet_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_packet_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_packet_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_packet_hex_verb(data, len) hex_log((data), (len))
#define dbg_packet_exec_verb(cmds) do { cmds } while (0)
#else
#define dbg_packet_verb(msg...)
......@@ -280,8 +280,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_packet_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_packet_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_packet_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_packet_hex_detail(data, len) hex_log((data), (len))
#define dbg_packet_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_packet_detail(msg...)
......@@ -308,8 +308,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_edns(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_edns_hex(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_edns(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_edns_hex(data, len) hex_log((data), (len))
#else
#define dbg_edns(msg...)
#define dbg_edns_hex(data, len)
......@@ -317,8 +317,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_edns_verb(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_edns_hex_verb(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_edns_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_edns_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_edns_verb(msg...)
#define dbg_edns_hex_verb(data, len)
......@@ -326,8 +326,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_edns_detail(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_edns_hex_detail(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_edns_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_edns_hex_detail(data, len) hex_log((data), (len))
#else
#define dbg_edns_detail(msg...)
#define dbg_edns_hex_detail(data, len)
......@@ -349,8 +349,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_tsig(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_tsig_hex(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_tsig(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_tsig_hex(data, len) hex_log((data), (len))
#else
#define dbg_tsig(msg...)
#define dbg_tsig_hex(data, len)
......@@ -358,8 +358,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_tsig_verb(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_tsig_hex_verb(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_tsig_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_tsig_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_tsig_verb(msg...)
#define dbg_tsig_hex_verb(data, len)
......@@ -367,8 +367,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_tsig_detail(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_tsig_hex_detail(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_tsig_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_tsig_hex_detail(data, len) hex_log((data), (len))
#else
#define dbg_tsig_detail(msg...)
#define dbg_tsig_hex_detail(data, len)
......@@ -390,8 +390,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_rrset(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_rrset_hex(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_rrset(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_rrset_hex(data, len) hex_log((data), (len))
#define dbg_rrset_exec(cmds) do { cmds } while (0)
#else
#define dbg_rrset(msg...)
......@@ -401,8 +401,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_rrset_verb(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_rrset_hex_verb(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_rrset_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_rrset_hex_verb(data, len) hex_log((data), (len))
#define dbg_rrset_exec_verb(cmds) do { cmds } while (0)
#else
#define dbg_rrset_verb(msg...)
......@@ -412,8 +412,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_rrset_detail(msg...) log_msg(LOG_ZONE, LOG_DEBUG, msg)
#define dbg_rrset_hex_detail(data, len) hex_log(LOG_ZONE, (data), (len))
#define dbg_rrset_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_rrset_hex_detail(data, len) hex_log((data), (len))
#define dbg_rrset_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_rrset_detail(msg...)
......@@ -440,8 +440,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_dnssec(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_dnssec_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_dnssec(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_dnssec_hex(data, len) hex_log((data), (len))
#define dbg_dnssec_exec(cmds) do { cmds } while (0)
#else
#define dbg_dnssec(msg...)
......@@ -451,8 +451,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_dnssec_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_dnssec_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_dnssec_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_dnssec_hex_verb(data, len) hex_log((data), (len))
#define dbg_dnssec_exec_verb(cmds) do { cmds } while (0)
#else
#define dbg_dnssec_verb(msg...)
......@@ -462,8 +462,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_dnssec_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_dnssec_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_dnssec_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_dnssec_hex_detail(data, len) hex_log((data), (len))
#define dbg_dnssec_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_dnssec_detail(msg...)
......
......@@ -426,14 +426,14 @@ int log_msg_zone_str(int priority, const char *zone, const char *fmt, ...)
return result;
}
void hex_log(int source, const char *data, int length)
void hex_log(const char *data, int length)
{
int ptr = 0;
char lbuf[512]={0}; int llen = 0;
for (; ptr < length; ptr++) {
if (ptr > 0 && ptr % 16 == 0) {
lbuf[llen] = '\0';
log_msg(source, LOG_DEBUG, "%s\n", lbuf);
log_msg(LOG_DEBUG, "%s\n", lbuf);
llen = 0;
}
int ret = snprintf(lbuf + llen, sizeof(lbuf) - llen, "0x%02x ",
......@@ -444,7 +444,7 @@ void hex_log(int source, const char *data, int length)
llen += ret;
}
if (llen > 0) {
log_msg(source, LOG_DEBUG, "%s\n", lbuf);
log_msg(LOG_DEBUG, "%s\n", lbuf);
}
}
......
......@@ -152,7 +152,7 @@ int log_msg_zone(int priority, const knot_dname_t *zone, const char *fmt, ...)
int log_msg_zone_str(int priority, const char *zone, const char *fmt, ...)
__attribute__((format(printf, 3, 4)));
void hex_log(int source, const char *data, int length);
void hex_log(const char *data, int length);
/* Convenient logging. */
......
......@@ -47,8 +47,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_server(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_server_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_server(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_server_hex(data, len) hex_log((data), (len))
#else
#define dbg_server(msg...)
#define dbg_server_hex(data, len)
......@@ -56,8 +56,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_server_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_server_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_server_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_server_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_server_verb(msg...)
#define dbg_server_hex_verb(data, len)
......@@ -65,8 +65,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_server_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_server_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_server_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_server_hex_detail(data, len) hex_log((data), (len))
#else
#define dbg_server_detail(msg...)
#define dbg_server_hex_detail(data, len)
......@@ -88,8 +88,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_net(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_net_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_net(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_net_hex(data, len) hex_log((data), (len))
#else
#define dbg_net(msg...)
#define dbg_net_hex(data, len)
......@@ -97,8 +97,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_net_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_net_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_net_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_net_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_net_verb(msg...)
#define dbg_net_hex_verb(data, len)
......@@ -106,8 +106,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_net_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_net_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_net_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_net_hex_detail(data, len) hex_log((data), (len))
#else
#define dbg_net_detail(msg...)
#define dbg_net_hex_detail(data, len)
......@@ -129,8 +129,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_rrl(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_rrl_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_rrl(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_rrl_hex(data, len) hex_log((data), (len))
#else
#define dbg_rrl(msg...)
#define dbg_rrl_hex(data, len)
......@@ -138,8 +138,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_rrl_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_rrl_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_rrl_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_rrl_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_rrl_verb(msg...)
#define dbg_rrl_hex_verb(data, len)
......@@ -147,8 +147,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_rrl_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_rrl_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_rrl_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_rrl_hex_detail(data, len) hex_log((data), (len))
#else
#define dbg_rrl_detail(msg...)
#define dbg_rrl_hex_detail(data, len)
......@@ -170,8 +170,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_dt(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_dt_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_dt(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_dt_hex(data, len) hex_log((data), (len))
#else
#define dbg_dt(msg...)
#define dbg_dt_hex(data, len)
......@@ -179,8 +179,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_dt_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_dt_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_dt_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_dt_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_dt_verb(msg...)
#define dbg_dt_hex_verb(data, len)
......@@ -188,8 +188,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_dt_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_dt_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_dt_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_dt_hex_detail(data, len) hex_log((data), (len))
#else
#define dbg_dt_detail(msg...)
#define dbg_dt_hex_detail(data, len)
......@@ -211,8 +211,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_journal(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_journal_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_journal(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_journal_hex(data, len) hex_log((data), (len))
#else
#define dbg_journal(msg...)
#define dbg_journal_hex(data, len)
......@@ -220,8 +220,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_journal_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_journal_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_journal_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_journal_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_journal_verb(msg...)
#define dbg_journal_hex_verb(data, len)
......@@ -229,8 +229,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_journal_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_journal_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_journal_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_journal_hex_detail(data, len) hex_log((data), (len))
#else
#define dbg_journal_detail(msg...)
#define dbg_journal_hex_detail(data, len)
......@@ -252,8 +252,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_zload(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_zload_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_zload(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_zload_hex(data, len) hex_log((data), (len))
#else
#define dbg_zload(msg...)
#define dbg_zload_hex(data, len)
......@@ -261,8 +261,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_zload_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_zload_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_zload_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_zload_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_zload_verb(msg...)
#define dbg_zload_hex_verb(data, len)
......@@ -270,8 +270,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_zload_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_zload_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_zload_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_zload_hex_detail(data, len) hex_log((data), (len))
#define dbg_zload_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_zload_detail(msg...)
......@@ -296,8 +296,8 @@
/* Brief messages. */
#ifdef DEBUG_ENABLE_BRIEF
#define dbg_semcheck(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_semcheck_hex(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_semcheck(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_semcheck_hex(data, len) hex_log((data), (len))
#else
#define dbg_semcheck(msg...)
#define dbg_semcheck_hex(data, len)
......@@ -305,8 +305,8 @@
/* Verbose messages. */
#ifdef DEBUG_ENABLE_VERBOSE
#define dbg_semcheck_verb(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_semcheck_hex_verb(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_semcheck_verb(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_semcheck_hex_verb(data, len) hex_log((data), (len))
#else
#define dbg_semcheck_verb(msg...)
#define dbg_semcheck_hex_verb(data, len)
......@@ -314,8 +314,8 @@
/* Detail messages. */
#ifdef DEBUG_ENABLE_DETAILS
#define dbg_semcheck_detail(msg...) log_msg(LOG_SERVER, LOG_DEBUG, msg)
#define dbg_semcheck_hex_detail(data, len) hex_log(LOG_SERVER, (data), (len))
#define dbg_semcheck_detail(msg...) log_msg(LOG_DEBUG, msg)
#define dbg_semcheck_hex_detail(data, len) hex_log((data), (len))
#define dbg_semcheck_exec_detail(cmds) do { cmds } while (0)
#else
#define dbg_semcheck_detail(msg...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment