Skip to content
Snippets Groups Projects
Verified Commit 5d7e9f15 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Tomas Krizek
Browse files

QRVERBOSE: fix ignoring the log groups

It would be yet another condition to check; overall I think the
necessary checks would get too complex to be done in a macro
and therefore copied all over the place.

Note: it's interesting that such a change reduces binary size
by about 3% (on master), and I suspect that speed won't suffer at all
(after that TODO is done).
parent bdf304b5
Branches
Tags
1 merge request!1181Fine grained logging
......@@ -8,17 +8,7 @@
#include "lib/defines.h"
#include "lib/utils.h"
/** Print a debug message related to resolution.
* \param _query associated kr_query, may be NULL
* \param _cls identifying string, typically of length exactly four (padded)
* \param ... printf-compatible list of parameters
*/
#define QRVERBOSE(_query, grp, ...) do { \
const struct kr_query *_qry = (_query); \
if (VERBOSE_STATUS || kr_log_qtrace_enabled(_qry)) { \
kr_log_q(_query, grp, ## __VA_ARGS__); \
} \
} while (false)
#define QRVERBOSE kr_log_q // TODO: perhaps eliminate
/** Layer processing states. Only one value at a time (but see TODO).
*
......
......@@ -287,6 +287,7 @@ void kr_log_req1(const struct kr_request * const req, uint32_t qry_uid,
void kr_log_q1(const struct kr_query * const qry,
enum kr_log_group group, const char *tag, const char *fmt, ...)
{
// TODO(optim.): early return if there's nothing to do
unsigned ind = 0;
for (const struct kr_query *q = qry; q; q = q->parent)
ind += 2;
......
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