fw: refactor strategy logging and improve ASF probe logging
Bring strategy logging in line with format from 6bf94c0.
This should also marginally improve performance when log level is raised.
Refs: #5262, #5267
Co-authored-by: Davide Pesavento <davidepesa@gmail.com>
Change-Id: I6493b6476f3d0c6ae5562b66abfa46f6c6f4903d
diff --git a/daemon/fw/process-nack-traits.cpp b/daemon/fw/process-nack-traits.cpp
index 4b4fbbc..25b2526 100644
--- a/daemon/fw/process-nack-traits.cpp
+++ b/daemon/fw/process-nack-traits.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -58,26 +58,20 @@
auto inR = pitEntry->getInRecord(*lastFaceNotNacked);
if (inR != pitEntry->in_end()) {
// one out-record not Nacked, which is also a downstream
- NFD_LOG_DEBUG(nack.getInterest() << " nack-from=" << inFace.getId() <<
- " nack=" << nack.getReason() <<
- " nack-to(bidirectional)=" << lastFaceNotNacked->getId() <<
- " out-nack=" << outNack.getReason());
+ NFD_LOG_NACK_FROM(nack, inFace.getId(), "bidirectional nack-to=" << lastFaceNotNacked->getId()
+ << " out-nack=" << outNack.getReason());
this->sendNackForProcessNackTraits(pitEntry, *lastFaceNotNacked, outNack);
return;
}
}
if (nOutRecordsNotNacked > 0) {
- NFD_LOG_DEBUG(nack.getInterest() << " nack-from=" << inFace.getId() <<
- " nack=" << nack.getReason() <<
- " waiting=" << nOutRecordsNotNacked);
+ NFD_LOG_NACK_FROM(nack, inFace.getId(), "waiting=" << nOutRecordsNotNacked);
// continue waiting
return;
}
- NFD_LOG_DEBUG(nack.getInterest() << " nack-from=" << inFace.getId() <<
- " nack=" << nack.getReason() <<
- " nack-to=all out-nack=" << outNack.getReason());
+ NFD_LOG_NACK_FROM(nack, inFace.getId(), "nack-to=all out-nack=" << outNack.getReason());
this->sendNacksForProcessNackTraits(pitEntry, outNack);
}