Skip to content

Commit

Permalink
CACHE_REQ: Log the Client ID of the cache request
Browse files Browse the repository at this point in the history
Log the Client ID at the initial cache request submission.

Reviewed-by: Sumit Bose <[email protected]>
  • Loading branch information
justin-stephenson authored and pbrezina committed Jun 8, 2021
1 parent 7ed8787 commit d0e3589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/responder/common/cache_req/cache_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,8 @@ struct tevent_req *cache_req_send(TALLOC_CTX *mem_ctx,
}
state->first_iteration = true;

CACHE_REQ_DEBUG(SSSDBG_TRACE_FUNC, cr, "New request '%s'\n", cr->reqname);
SSS_REQ_TRACE_CID_CR(SSSDBG_TRACE_FUNC, cr, "New request [CID #%u] '%s'\n",
rctx->client_id_num, cr->reqname);

ret = cache_req_is_well_known_object(state, cr, &result);
if (ret == EOK) {
Expand Down
4 changes: 4 additions & 0 deletions src/responder/common/cache_req/cache_req_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#define CACHE_REQ_DEBUG(level, cr, fmt, ...) \
DEBUG(level, "CR #%u: " fmt, (cr)->reqid, ##__VA_ARGS__)

/* Tracing message, changing this can break log parsing tools */
#define SSS_REQ_TRACE_CID_CR(level, cr, fmt, ...) \
CACHE_REQ_DEBUG(level, cr, "REQ_TRACE: " fmt, ##__VA_ARGS__)

struct cache_req {
/* Provided input. */
struct cache_req_data *data;
Expand Down

0 comments on commit d0e3589

Please sign in to comment.