-
Notifications
You must be signed in to change notification settings - Fork 4
RDKEMW-13612-RFC Logs Not Found in the rfcscript.log in RDKE Builds #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.hinclude. - Replaced
rdk_logger_init(...)withrdk_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.
| 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 */ | ||
| }; |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
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).
| 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 */ |
| .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 */ | ||
| }; |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
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.
| static char RFCMGRLOG[] = "LOG.RDK.RFCMGR"; | ||
| rdk_logger_ext_config_t config = { | ||
| .pModuleName = RFCMGRLOG, /* Module name */ |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
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.
| 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 */ |
No description provided.