mirror of https://github.com/getdnsapi/getdns.git
Options for request debugging
This commit is contained in:
parent
fe49bc1c69
commit
2220c1a48d
12
configure.ac
12
configure.ac
|
@ -149,15 +149,16 @@ fi
|
||||||
])
|
])
|
||||||
ACX_ARG_RPATH
|
ACX_ARG_RPATH
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(debug-req, AC_HELP_STRING([--enable-debug-req], [Enable request debugging]))
|
||||||
AC_ARG_ENABLE(debug-sched, AC_HELP_STRING([--enable-debug-sched], [Enable scheduling debugging messages]))
|
AC_ARG_ENABLE(debug-sched, AC_HELP_STRING([--enable-debug-sched], [Enable scheduling debugging messages]))
|
||||||
AC_ARG_ENABLE(debug-stub, AC_HELP_STRING([--enable-debug-stub], [Enable stub debugging messages]))
|
AC_ARG_ENABLE(debug-stub, AC_HELP_STRING([--enable-debug-stub], [Enable stub debugging messages]))
|
||||||
AC_ARG_ENABLE(debug-daemon, AC_HELP_STRING([--enable-debug-daemon], [Enable daemon debugging messages]))
|
AC_ARG_ENABLE(debug-daemon, AC_HELP_STRING([--enable-debug-daemon], [Enable daemon debugging messages]))
|
||||||
AC_ARG_ENABLE(debug-sec, AC_HELP_STRING([--enable-debug-sec], [Enable dnssec debugging messages]))
|
AC_ARG_ENABLE(debug-sec, AC_HELP_STRING([--enable-debug-sec], [Enable dnssec debugging messages]))
|
||||||
AC_ARG_ENABLE(debug-server, AC_HELP_STRING([--enable-debug-server], [Enable server debugging messages]))
|
AC_ARG_ENABLE(debug-server, AC_HELP_STRING([--enable-debug-server], [Enable server debugging messages]))
|
||||||
AC_ARG_ENABLE(all-debugging, AC_HELP_STRING([--enable-all-debugging], [Enable scheduling, stub and dnssec debugging]))
|
AC_ARG_ENABLE(all-debugging, AC_HELP_STRING([--enable-all-debugging], [Enable all debugging messages]))
|
||||||
case "$enable_all_debugging" in
|
case "$enable_all_debugging" in
|
||||||
yes)
|
yes)
|
||||||
|
enable_debug_req=yes
|
||||||
enable_debug_sched=yes
|
enable_debug_sched=yes
|
||||||
enable_debug_stub=yes
|
enable_debug_stub=yes
|
||||||
enable_debug_daemon=yes
|
enable_debug_daemon=yes
|
||||||
|
@ -167,6 +168,13 @@ case "$enable_all_debugging" in
|
||||||
no|*)
|
no|*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
case "$enable_debug_req" in
|
||||||
|
yes)
|
||||||
|
AC_DEFINE_UNQUOTED([REQ_DEBUG], [1], [Define this to enable printing of request debugging messages.])
|
||||||
|
;;
|
||||||
|
no|*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
case "$enable_debug_sched" in
|
case "$enable_debug_sched" in
|
||||||
yes)
|
yes)
|
||||||
AC_DEFINE_UNQUOTED([SCHED_DEBUG], [1], [Define this to enable printing of scheduling debugging messages.])
|
AC_DEFINE_UNQUOTED([SCHED_DEBUG], [1], [Define this to enable printing of scheduling debugging messages.])
|
||||||
|
|
10
src/debug.h
10
src/debug.h
|
@ -91,6 +91,13 @@
|
||||||
|
|
||||||
#define DEBUG_OFF(...) do {} while (0)
|
#define DEBUG_OFF(...) do {} while (0)
|
||||||
|
|
||||||
|
#if defined(REQ_DEBUG) && REQ_DEBUG
|
||||||
|
#include <time.h>
|
||||||
|
#define DEBUG_REQ(...) DEBUG_ON(__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define DEBUG_REQ(...) DEBUG_OFF(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SCHED_DEBUG) && SCHED_DEBUG
|
#if defined(SCHED_DEBUG) && SCHED_DEBUG
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#define DEBUG_SCHED(...) DEBUG_ON(__VA_ARGS__)
|
#define DEBUG_SCHED(...) DEBUG_ON(__VA_ARGS__)
|
||||||
|
@ -139,7 +146,8 @@
|
||||||
#define DEBUG_MDNS(...) DEBUG_OFF(__VA_ARGS__)
|
#define DEBUG_MDNS(...) DEBUG_OFF(__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(SCHED_DEBUG) && SCHED_DEBUG) || \
|
#if (defined(REQ_DEBUG) && REQ_DEBUG) || \
|
||||||
|
(defined(SCHED_DEBUG) && SCHED_DEBUG) || \
|
||||||
(defined(STUB_DEBUG) && STUB_DEBUG) || \
|
(defined(STUB_DEBUG) && STUB_DEBUG) || \
|
||||||
(defined(DAEMON_DEBUG) && DAEMON_DEBUG) || \
|
(defined(DAEMON_DEBUG) && DAEMON_DEBUG) || \
|
||||||
(defined(SEC_DEBUG) && SEC_DEBUG) || \
|
(defined(SEC_DEBUG) && SEC_DEBUG) || \
|
||||||
|
|
Loading…
Reference in New Issue