Skip to content

Commit

Permalink
[ESP32] Support log configuration in menuconfig (project-chip#20597)
Browse files Browse the repository at this point in the history
  • Loading branch information
whisper2chen authored and isiu-apple committed Sep 16, 2022
1 parent e4fdf51 commit c8ad935
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ chip_gn_arg_append("esp32_cxx" "\"${CMAKE_CXX_COMPILER}\"")
chip_gn_arg_append("esp32_cpu" "\"esp32\"")
chip_gn_arg_bool("is_debug" ${is_debug})

# Config the chip log level by IDF menuconfig
chip_gn_arg_bool ("chip_error_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1)
chip_gn_arg_bool ("chip_progress_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 3)
chip_gn_arg_bool ("chip_detail_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 4)
chip_gn_arg_bool ("chip_automation_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 5)

if(CONFIG_ENABLE_CHIPOBLE)
chip_gn_arg_append("chip_config_network_layer_ble" "true")
else()
Expand Down
2 changes: 2 additions & 0 deletions src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ CHIP_ERROR ConnectivityManagerImpl::_GetAndLogWiFiStatsCounters(void)
uint16_t freq;
uint16_t bssid;

IgnoreUnusedVariable(freq);
IgnoreUnusedVariable(bssid);
err = esp_wifi_get_config(WIFI_IF_STA, &wifiConfig);
if (err != ESP_OK)
{
Expand Down

0 comments on commit c8ad935

Please sign in to comment.