mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
Change QP and qpcache logging from DEBUG(1) to DEBUG(3)
Per pspacek, currently qp and qpcache logs are too verbose and enabled at a level too low compared to how often the logging is useful. This commit increases the logging level, while keeping it configurable via a define.
This commit is contained in:
@@ -48,8 +48,8 @@
|
||||
|
||||
#include "qp_p.h"
|
||||
|
||||
#ifndef DNS_QP_LOG_STATS
|
||||
#define DNS_QP_LOG_STATS 1
|
||||
#ifndef DNS_QP_LOG_STATS_LEVEL
|
||||
#define DNS_QP_LOG_STATS_LEVEL 3
|
||||
#endif
|
||||
#ifndef DNS_QP_TRACE
|
||||
#define DNS_QP_TRACE 0
|
||||
@@ -68,10 +68,10 @@ static atomic_uint_fast64_t rollback_time;
|
||||
/* for LOG_STATS() format strings */
|
||||
#define PRItime " %" PRIu64 " ns "
|
||||
|
||||
#if DNS_QP_LOG_STATS
|
||||
#if DNS_QP_LOG_STATS_LEVEL
|
||||
#define LOG_STATS(...) \
|
||||
isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_QP, \
|
||||
ISC_LOG_DEBUG(1), __VA_ARGS__)
|
||||
ISC_LOG_DEBUG(DNS_QP_LOG_STATS_LEVEL), __VA_ARGS__)
|
||||
#else
|
||||
#define LOG_STATS(...)
|
||||
#endif
|
||||
|
@@ -59,6 +59,10 @@
|
||||
#include "db_p.h"
|
||||
#include "qpcache_p.h"
|
||||
|
||||
#ifndef DNS_QPCACHE_LOG_STATS_LEVEL
|
||||
#define DNS_QPCACHE_LOG_STATS_LEVEL 3
|
||||
#endif
|
||||
|
||||
#define CHECK(op) \
|
||||
do { \
|
||||
result = (op); \
|
||||
@@ -589,11 +593,11 @@ static void
|
||||
delete_node(qpcache_t *qpdb, qpcnode_t *node) {
|
||||
isc_result_t result = ISC_R_UNEXPECTED;
|
||||
|
||||
if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
|
||||
if (isc_log_wouldlog(ISC_LOG_DEBUG(DNS_QPCACHE_LOG_STATS_LEVEL))) {
|
||||
char printname[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(&node->name, printname, sizeof(printname));
|
||||
isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
|
||||
ISC_LOG_DEBUG(1),
|
||||
ISC_LOG_DEBUG(DNS_QPCACHE_LOG_STATS_LEVEL),
|
||||
"delete_node(): %p %s (bucket %d)", node,
|
||||
printname, node->locknum);
|
||||
}
|
||||
@@ -2212,7 +2216,8 @@ qpcache__destroy(qpcache_t *qpdb) {
|
||||
strlcpy(buf, "<UNKNOWN>", sizeof(buf));
|
||||
}
|
||||
isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
|
||||
ISC_LOG_DEBUG(1), "done %s(%s)", __func__, buf);
|
||||
ISC_LOG_DEBUG(DNS_QPCACHE_LOG_STATS_LEVEL), "done %s(%s)",
|
||||
__func__, buf);
|
||||
|
||||
if (dns_name_dynamic(&qpdb->common.origin)) {
|
||||
dns_name_free(&qpdb->common.origin, qpdb->common.mctx);
|
||||
|
Reference in New Issue
Block a user