Skip to content

RDKEMW-10793: [NetworkManager] Reduce repetitive logging#299

Open
gururaajar wants to merge 1 commit intodevelopfrom
topic/RDKEMW-10793
Open

RDKEMW-10793: [NetworkManager] Reduce repetitive logging#299
gururaajar wants to merge 1 commit intodevelopfrom
topic/RDKEMW-10793

Conversation

@gururaajar
Copy link
Copy Markdown
Contributor

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

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>
@gururaajar gururaajar requested a review from a team as a code owner March 30, 2026 18:25
Copilot AI review requested due to automatic review settings March 30, 2026 18:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / getIPSettings2 to use DEBUG request/response logging and inline the prior returnJson(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.

Comment on lines 716 to 720
}
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);
}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants