2323#define LOGARGS (pipeline , lvl ) \
2424 ((lcb_INSTANCE *)((pipeline)->parent->cqdata))->settings, "mcreq", LCB_LOG_##lvl, __FILE__, __LINE__
2525
26+ #define LOGFMT "(SRV=%p,IX=%d) "
27+ #define LOGID (pipeline ) (void *)(pipeline), (pipeline)->index
28+
2629#define PKT_HDRSIZE (pkt ) (MCREQ_PKT_BASESIZE + (pkt)->extlen)
2730
2831lcb_STATUS mcreq_reserve_header (mc_PIPELINE * pipeline , mc_PACKET * packet , uint8_t hdrsize )
@@ -309,7 +312,9 @@ static mc_PACKET *check_collection_id(mc_PIPELINE *pipeline, mc_PACKET *packet)
309312 }
310313 } else if (pipeline -> parent -> cqdata ) {
311314 lcb_log (LOGARGS (pipeline , DEBUG ),
312- "Custom collection id has been dispatched to the node, that does not support collections" );
315+ LOGFMT
316+ "Custom collection id has been dispatched to the node, that does not support collections" ,
317+ LOGID (pipeline ));
313318 }
314319 }
315320 break ;
@@ -318,7 +323,8 @@ static mc_PACKET *check_collection_id(mc_PIPELINE *pipeline, mc_PACKET *packet)
318323 // the pipeline hadn't completed handshake yet, so trust global settings, and let operation be fixed
319324 // when it will be retried in case of misprediction.
320325 if (pipeline -> parent -> cqdata ) {
321- lcb_log (LOGARGS (pipeline , DEBUG ), "Collections has not been negotiated for the pipeline yet" );
326+ lcb_log (LOGARGS (pipeline , DEBUG ), LOGFMT "Collections has not been negotiated for the pipeline yet" ,
327+ LOGID (pipeline ));
322328 }
323329 break ;
324330 }
0 commit comments