Select one of the symbols to view example projects that use it.
 
Outline
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "esp_log.h"
#include "esp_private/log_lock.h"
#include "esp_private/log_level.h"
#include "sdkconfig.h"
s_log_print_func
esp_log_set_vprintf(vprintf_like_t)
esp_log_writev(esp_log_level_t, const char *, const char *, va_list)
esp_log_write(esp_log_level_t, const char *, const char *, ...)
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/log/src/os/log_write.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #include <stdarg.h> #include <stddef.h> #include <string.h> #include <stdio.h> #include "esp_log.h" #include "esp_private/log_lock.h" #include "esp_private/log_level.h" #include "sdkconfig.h"8 includes static vprintf_like_t s_log_print_func = &vprintf; vprintf_like_t esp_log_set_vprintf(vprintf_like_t func) { esp_log_impl_lock(); vprintf_like_t orig_func = s_log_print_func; s_log_print_func = func; esp_log_impl_unlock(); return orig_func; }{ ... } void esp_log_writev(esp_log_level_t level, const char *tag, const char *format, va_list args) { esp_log_level_t level_for_tag = esp_log_level_get_timeout(tag); if (ESP_LOG_NONE != level_for_tag && level <= level_for_tag) { (*s_log_print_func)(format, args); }{...} }{ ... } void esp_log_write(esp_log_level_t level, const char *tag, const char *format, ...) { va_list list; va_start(list, format); esp_log_writev(level, tag, format, list); va_end(list); }{ ... }
Details