Skip to content

Commit

Permalink
[ESP32] Added config option chip-enable-schema-check (#17595)
Browse files Browse the repository at this point in the history
* [ESP32] Added config option chip-enable-schema-check

* Changed ChipLoggingDetail to use ESP_LOGD
  • Loading branch information
jadhavrohit924 authored and pull[bot] committed Jan 26, 2024
1 parent 123f985 commit 2356076
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ if (CONFIG_BUILD_CHIP_TESTS)
chip_gn_arg_bool("chip_build_tests" "true")
endif()

if (CONFIG_CHIP_ENABLE_SCHEMA_CHECK)
chip_gn_arg_bool("chip_enable_schema_check" "true")
endif()

if (NOT CONFIG_USE_MINIMAL_MDNS)
chip_gn_arg_append("chip_mdns" "\"platform\"")
endif()
Expand Down
10 changes: 10 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,16 @@ menu "CHIP Device Layer"
When size is set to 0, the debug event buffer and all support
for the debug level events are disabled.


config CHIP_ENABLE_SCHEMA_CHECK
bool "Enable Schema Check"
default y
help
If enabled, it checks incoming messages are following the expected schema,
and incoming message payloads are logged in detail.
To see detailed logging please set default log level to Debug.
(Component config --> Log output --> Default log verbosity --> Debug)

endmenu

menu "Matter OTA Image"
Expand Down
2 changes: 1 addition & 1 deletion src/platform/ESP32/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char
ESP_LOGI(tag, "%s", formattedMsg);
break;
case kLogCategory_Detail:
ESP_LOGV(tag, "%s", formattedMsg);
ESP_LOGD(tag, "%s", formattedMsg);
break;
}
}
Expand Down

0 comments on commit 2356076

Please sign in to comment.