Skip to content

Conversation

@Vismalskumar0
Copy link
Contributor

No description provided.

@Vismalskumar0 Vismalskumar0 requested a review from a team as a code owner February 6, 2026 16:31
Copilot AI review requested due to automatic review settings February 6, 2026 16:31
Copy link
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

Updates RFC Manager’s logging initialization to address missing RFC logs in RDKE builds by switching from rdk_logger_init(debug.ini) to the extended logger initialization path.

Changes:

  • Added rdk_logger.h include.
  • Replaced rdk_logger_init(...) with rdk_logger_ext_init(...) using an explicit module/config struct.
  • Hardcoded default log level/output/format in the new config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +45 to +51
rdk_logger_ext_config_t config = {
.pModuleName = RFCMGRLOG, /* Module name */
.loglevel = RDK_LOG_INFO, /* Default log level */
.output = RDKLOG_OUTPUT_CONSOLE, /* Output to console (stdout/stderr) */
.format = RDKLOG_FORMAT_WITH_TS, /* Timestamped format */
.pFilePolicy = NULL /* Not using file output, so NULL */
};
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

rfcMgr is built with -std=c++17 (see rfcMgr/Makefile.am), but this uses C99/C++20-style designated initializers (.pModuleName = ...). This is not valid C++17 and will fail to compile on standard-compliant toolchains. Initialize the struct without designated initializers (e.g., default-construct then assign fields, or use positional aggregate initialization if the struct is an aggregate).

Suggested change
rdk_logger_ext_config_t config = {
.pModuleName = RFCMGRLOG, /* Module name */
.loglevel = RDK_LOG_INFO, /* Default log level */
.output = RDKLOG_OUTPUT_CONSOLE, /* Output to console (stdout/stderr) */
.format = RDKLOG_FORMAT_WITH_TS, /* Timestamped format */
.pFilePolicy = NULL /* Not using file output, so NULL */
};
rdk_logger_ext_config_t config{};
config.pModuleName = RFCMGRLOG; /* Module name */
config.loglevel = RDK_LOG_INFO; /* Default log level */
config.output = RDKLOG_OUTPUT_CONSOLE; /* Output to console (stdout/stderr) */
config.format = RDKLOG_FORMAT_WITH_TS; /* Timestamped format */
config.pFilePolicy = NULL; /* Not using file output, so NULL */

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +51
.loglevel = RDK_LOG_INFO, /* Default log level */
.output = RDKLOG_OUTPUT_CONSOLE, /* Output to console (stdout/stderr) */
.format = RDKLOG_FORMAT_WITH_TS, /* Timestamped format */
.pFilePolicy = NULL /* Not using file output, so NULL */
};
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

This replaces rdk_logger_init(…debug.ini…) with a hardcoded extended-logger config (INFO level, console output, no file policy). That removes runtime configurability via /etc/debug.ini/override paths and may change where logs are written. Consider continuing to honor the debug.ini selection (or mapping its settings into the ext config) instead of hardcoding output/level.

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +46
static char RFCMGRLOG[] = "LOG.RDK.RFCMGR";
rdk_logger_ext_config_t config = {
.pModuleName = RFCMGRLOG, /* Module name */
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

RFCMGRLOG duplicates the existing LOG_RFCMGR module name macro (defined in rfc_common.h) and is mutable (char[]) even though it’s a constant string. Prefer reusing LOG_RFCMGR and making the module name const char*/constexpr to avoid duplication and accidental mutation.

Suggested change
static char RFCMGRLOG[] = "LOG.RDK.RFCMGR";
rdk_logger_ext_config_t config = {
.pModuleName = RFCMGRLOG, /* Module name */
rdk_logger_ext_config_t config = {
.pModuleName = LOG_RFCMGR, /* Module name */

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.

1 participant