config for u8g2_hal logging

This commit is contained in:
Christopher Liebman 2018-01-28 08:44:42 -08:00
parent 6ab4e383a8
commit 174888b6a1
2 changed files with 29 additions and 1 deletions

View File

@ -131,4 +131,32 @@ config DISPLAY_LOG_LEVEL
default 4 if DISPLAY_LOG_LEVEL_DEBUG default 4 if DISPLAY_LOG_LEVEL_DEBUG
default 5 if DISPLAY_LOG_LEVEL_VERBOSE default 5 if DISPLAY_LOG_LEVEL_VERBOSE
choice U8G2_HAL_LOG_LEVEL
prompt "U8G2_HAL Log Level"
default U8G2_HAL_LOG_LEVEL_INFO
help
Logging level for U8G2_HAL implementation
config U8G2_HAL_LOG_LEVEL_NONE
bool "No output"
config U8G2_HAL_LOG_LEVEL_ERROR
bool "Error"
config U8G2_HAL_LOG_LEVEL_WARN
bool "Warning"
config U8G2_HAL_LOG_LEVEL_INFO
bool "Info"
config U8G2_HAL_LOG_LEVEL_DEBUG
bool "Debug"
config U8G2_HAL_LOG_LEVEL_VERBOSE
bool "Verbose"
endchoice
config U8G2_HAL_LOG_LEVEL
int
default 0 if U8G2_HAL_LOG_LEVEL_NONE
default 1 if U8G2_HAL_LOG_LEVEL_ERROR
default 2 if U8G2_HAL_LOG_LEVEL_WARN
default 3 if U8G2_HAL_LOG_LEVEL_INFO
default 4 if U8G2_HAL_LOG_LEVEL_DEBUG
default 5 if U8G2_HAL_LOG_LEVEL_VERBOSE
endmenu endmenu

View File

@ -126,7 +126,7 @@ static void dsp_task()
void start_display() void start_display()
{ {
esp_log_level_set(TAG, CONFIG_DISPLAY_LOG_LEVEL); esp_log_level_set(TAG, CONFIG_DISPLAY_LOG_LEVEL);
esp_log_level_set("u8g2_hal", ESP_LOG_INFO); esp_log_level_set("u8g2_hal", CONFIG_U8G2_HAL_LOG_LEVEL);
xTaskCreatePinnedToCore(dsp_task, "dsp_task", 1024*4, NULL, DSP_TASK_PRI, NULL, 1); xTaskCreatePinnedToCore(dsp_task, "dsp_task", 1024*4, NULL, DSP_TASK_PRI, NULL, 1);