Skip to content

Commit

Permalink
[ESP32] Config Option to enable/disable log filtering APIs (#27012)
Browse files Browse the repository at this point in the history
* [ESP32] Option to enable/disable log filtering APIs

Also,
- Removed the stale TODO

* Fix the kconfig help to match with default value
  • Loading branch information
shubhamdp authored Jun 5, 2023
1 parent b552c54 commit 275341e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ menu "CHIP Core"
int "Set threshold in ms"
default 700
help
Time threshold for warning that dispatched took too long. You can
set this default set to 0 to to disable event dispatching time
measurement and suppress the logs "Long dispatch time:...".
Time threshold for warning that dispatched took too long. You can
set this default set to 0 to to disable event dispatching time
measurement and suppress the logs "Long dispatch time:...".

# TODO: add log level selection
config CHIP_LOG_FILTERING
bool "CHIP log level filtering APIs"
default n
help
Option to enable/disable CHIP log level filtering APIs.

endmenu # "General Options"

Expand Down
4 changes: 4 additions & 0 deletions src/platform/ESP32/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
// The ESP NVS implementation limits key names to 15 characters.
#define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 15

#ifndef CONFIG_CHIP_LOG_FILTERING
#define CHIP_LOG_FILTERING 0
#else
#define CHIP_LOG_FILTERING CONFIG_CHIP_LOG_FILTERING
#endif

#define CHIP_CONFIG_ABORT() abort()

Expand Down

0 comments on commit 275341e

Please sign in to comment.