-
Notifications
You must be signed in to change notification settings - Fork 3
RDKEMW-7905 : remove ctrlm build flags - ANSI_CODES_DISABLED #110
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
RDKEMW-7905 : remove ctrlm build flags - ANSI_CODES_DISABLED #110
Conversation
egalla204
left a comment
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.
approved for test
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
This PR removes the ANSI_CODES_DISABLED build flag, which previously controlled whether ANSI color codes were used in logging output. The change simplifies the build configuration by always enabling color-coded logging.
Key changes:
- Removed the ANSI_CODES_DISABLED CMake option and its conditional compilation logic
- Updated logging initialization calls to explicitly enable color/ANSI code support
- Modified XLOG_OPTS_DEFAULT to unconditionally include XLOG_OPTS_COLOR
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| CMakeLists.txt | Removed ANSI_CODES_DISABLED build option and conditional compilation definitions |
| src/ctrlm_log.h | Removed conditional compilation, now always includes XLOG_OPTS_COLOR in default options |
| src/ctrlm_main.cpp | Added boolean parameter to vsdk_init() call to enable ANSI codes |
| src/factory/ctrlmf_version.c | Added boolean parameter to xlog_init() call to enable ANSI codes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
| vsdk_init(); | ||
| vsdk_init(true); |
Copilot
AI
Nov 17, 2025
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.
The boolean parameter true passed to vsdk_init() lacks clarity. Consider using a named constant or enum value (e.g., VSDK_ENABLE_ANSI_CODES or vsdk_init(/*enable_ansi_codes=*/true)) to make the parameter's purpose self-documenting, especially since this relates to the removal of the ANSI_CODES_DISABLED flag.
| rdk_version_object_free(&info); | ||
|
|
||
| int rc = xlog_init(XLOG_MODULE_ID, NULL, 0); | ||
| int rc = xlog_init(XLOG_MODULE_ID, NULL, 0, true); |
Copilot
AI
Nov 17, 2025
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.
The boolean parameter true passed to xlog_init() lacks clarity. Consider using a named constant or enum value (e.g., XLOG_ENABLE_ANSI_CODES or xlog_init(XLOG_MODULE_ID, NULL, 0, /*enable_ansi_codes=*/true)) to make the parameter's purpose self-documenting and align with the PR's intent to remove the ANSI_CODES_DISABLED flag.
No description provided.