From a8b75ed974c0c2b4d8bd5b61bb3dcb4ba15e5642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lourens=20Naud=C3=A9?= Date: Sat, 31 Dec 2016 17:54:40 +0000 Subject: [PATCH] log: fix esp_log_level_set function name in docs Fix documentation and comments to reflect the new esp_log_level_set API (and not deprecated esp_log_set_level) --- components/log/README.rst | 12 ++++++------ components/log/log.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/log/README.rst b/components/log/README.rst index d378179c8f..002dadf812 100644 --- a/components/log/README.rst +++ b/components/log/README.rst @@ -4,11 +4,11 @@ Logging library Overview -------- -Log library has two ways of managing log verbosity: compile time, set via menuconfig; and runtime, using ``esp_log_set_level`` function. +Log library has two ways of managing log verbosity: compile time, set via menuconfig; and runtime, using ``esp_log_level_set`` function. At compile time, filtering is done using ``CONFIG_LOG_DEFAULT_LEVEL`` macro, set via menuconfig. All logging statments for levels higher than ``CONFIG_LOG_DEFAULT_LEVEL`` will be removed by the preprocessor. -At run time, all logs below ``CONFIG_LOG_DEFAULT_LEVEL`` are enabled by default. ``esp_log_set_level`` function may be used to set logging level per module. Modules are identified by their tags, which are human-readable ASCII zero-terminated strings. +At run time, all logs below ``CONFIG_LOG_DEFAULT_LEVEL`` are enabled by default. ``esp_log_level_set`` function may be used to set logging level per module. Modules are identified by their tags, which are human-readable ASCII zero-terminated strings. How to use this library ----------------------- @@ -51,11 +51,11 @@ At component scope, define it in component makefile: CFLAGS += -D LOG_LOCAL_LEVEL=ESP_LOG_DEBUG -To configure logging output per module at runtime, add calls to ``esp_log_set_level`` function: +To configure logging output per module at runtime, add calls to ``esp_log_level_set`` function: .. code-block:: c - esp_log_set_level("*", ESP_LOG_ERROR); // set all components to ERROR level - esp_log_set_level("wifi", ESP_LOG_WARN); // enable WARN logs from WiFi stack - esp_log_set_level("dhcpc", ESP_LOG_INFO); // enable INFO logs from DHCP client + esp_log_level_set("*", ESP_LOG_ERROR); // set all components to ERROR level + esp_log_level_set("wifi", ESP_LOG_WARN); // enable WARN logs from WiFi stack + esp_log_level_set("dhcpc", ESP_LOG_INFO); // enable INFO logs from DHCP client diff --git a/components/log/log.c b/components/log/log.c index 9670b82dfd..3826e173ba 100644 --- a/components/log/log.c +++ b/components/log/log.c @@ -15,7 +15,7 @@ /* * Log library — implementation notes. * - * Log library stores all tags provided to esp_log_set_level as a linked + * Log library stores all tags provided to esp_log_level_set as a linked * list. See uncached_tag_entry_t structure. * * To avoid looking up log level for given tag each time message is