RDKEMW-10793: [NetworkManager] Reduce repetitive logging#299
RDKEMW-10793: [NetworkManager] Reduce repetitive logging#299gururaajar wants to merge 1 commit intodevelopfrom
Conversation
Reason for Change: Changed the repetitive getIPSettings log from INFO to debug Test Procedure: Check whether the logs are getting printed in the wpeframework.log Priority: P1 Risks: Medium Signed-off-by: Gururaaja ESR<Gururaja_ErodeSriranganRamlingham@comcast.com>
There was a problem hiding this comment.
Pull request overview
This PR reduces log noise from frequently invoked IP settings paths in the NetworkManager components by lowering certain logs from INFO to DEBUG.
Changes:
- Downgraded IP address detail logs in the GNOME proxy from INFO to DEBUG (IPv4 addr, IPv6 link-local/global).
- Added DEBUG-level request/response logging macros for legacy JSON-RPC handlers.
- Updated
getIPSettings/getIPSettings2to use DEBUG request/response logging and inline the priorreturnJson(rc)response handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugin/gnome/NetworkManagerGnomeProxy.cpp | Reduces verbosity of per-address logging by switching INFO → DEBUG. |
| legacy/LegacyNetworkAPIs.cpp | Adds DEBUG param/response logging and applies it to getIPSettings* handlers. |
Comments suppressed due to low confidence (1)
legacy/LegacyNetworkAPIs.cpp:45
- DEBUGLOG_INPARAM/DEBUGLOG_OUTPARAM adds a second logging path, but getIPSettings/getIPSettings2 now duplicate the existing returnJson(rc) behavior (setting response["success"], logging, and returning). To avoid divergence/maintenance issues, consider adding a dedicated macro (e.g., returnJsonDebug(rc)) or parameterizing returnJson to choose INFO vs DEBUG logging, then reuse it in these methods.
#define LOG_INPARAM() { string json; parameters.ToString(json); NMLOG_INFO("params=%s", json.c_str() ); }
#define LOG_OUTPARAM() { string json; response.ToString(json); NMLOG_INFO("response=%s", json.c_str() ); }
#define DEBUGLOG_INPARAM() { string json; parameters.ToString(json); NMLOG_DEBUG("params=%s", json.c_str() ); }
#define DEBUGLOG_OUTPARAM() { string json; response.ToString(json); NMLOG_DEBUG("response=%s", json.c_str() ); }
#define returnJson(rc) \
{ \
if (Core::ERROR_NONE == rc) \
response["success"] = true; \
else \
response["success"] = false; \
LOG_OUTPARAM(); \
return Core::ERROR_NONE; \
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| result.ipaddress = nm_ip_address_get_address(ipAddr); | ||
| result.prefix = nm_ip_address_get_prefix(ipAddr); | ||
| NMLOG_INFO("IPv4 addr: %s/%d", result.ipaddress.c_str(), result.prefix); | ||
| NMLOG_DEBUG("IPv4 addr: %s/%d", result.ipaddress.c_str(), result.prefix); | ||
| } |
There was a problem hiding this comment.
PR description says the change is only lowering repetitive getIPSettings logging, but this PR also changes IP address logs in NetworkManagerGnomeProxy (IPv4 addr / link-local / global) from INFO to DEBUG. Please update the PR description (or confirm these additional log-level changes are intended) so reviewers/operators understand the full logging impact.
Reason for Change: Changed the repetitive getIPSettings log from INFO to debug
Test Procedure: Check whether the logs are getting printed in the wpeframework.log
Priority: P1
Risks: Medium