Skip to content

Commit

Permalink
Add GN arg to enable logging of node Id in exchange context (#32670)
Browse files Browse the repository at this point in the history
* Add gn arg to enable node id logging

* Remove unused define
  • Loading branch information
leonardmgh authored and pull[bot] committed May 14, 2024
1 parent d0e3996 commit 1398924
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/lib/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ buildconfig_header("chip_buildconfig") {
"CHIP_AUTOMATION_LOGGING=${chip_automation_logging}",
"CHIP_PW_TOKENIZER_LOGGING=${chip_pw_tokenizer_logging}",
"CHIP_USE_PW_LOGGING=${chip_use_pw_logging}",
"CHIP_EXCHANGE_NODE_ID_LOGGING=${chip_exchange_node_id_logging}",
"CHIP_CONFIG_SHORT_ERROR_STR=${chip_config_short_error_str}",
"CHIP_CONFIG_ENABLE_ARG_PARSER=${chip_config_enable_arg_parser}",
"CHIP_TARGET_STYLE_UNIX=${chip_target_style_unix}",
Expand Down
10 changes: 0 additions & 10 deletions src/lib/core/CHIPConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,16 +461,6 @@
#define CHIP_CONFIG_ENABLE_CONDITION_LOGGING 0
#endif // CHIP_CONFIG_ENABLE_CONDITION_LOGGING

/**
* @def CHIP_EXCHANGE_NODE_ID_LOGGING
*
* @brief
* If asserted (1), enable logging of node IDs in exchange context.
*/
#ifndef CHIP_EXCHANGE_NODE_ID_LOGGING
#define CHIP_EXCHANGE_NODE_ID_LOGGING 0
#endif // CHIP_EXCHANGE_NODE_ID_LOGGING

/**
* @def CHIP_CONFIG_TEST
*
Expand Down
4 changes: 4 additions & 0 deletions src/lib/core/core.gni
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ declare_args() {
# Configure chip logging to output through pigweed logging.
chip_use_pw_logging = false

# Enable logging of node Id in exchange context log messages.
# Will cause increase in code size and is therefore disabled by default.
chip_exchange_node_id_logging = false

# Configure chip logging to output through external logging implementation.
# External code will need to provide implementation for CHIP log output
# function (LogV), which is defined in "src/platform/logging/LogV.h".
Expand Down

0 comments on commit 1398924

Please sign in to comment.