ESPHome 2026.3.0-dev
Loading...
Searching...
No Matches
esphome::logger Namespace Reference

Data Structures

struct  CStrCompare
 
struct  LogBuffer
 
struct  LogCallback
 Lightweight callback for receiving log messages without virtual dispatch overhead. More...
 
class  Logger
 Logger component for all ESPHome logging. More...
 
class  LoggerLevelListener
 Interface for receiving log level changes without std::function overhead. More...
 
class  LoggerLevelSelect
 
class  LoggerMessageTrigger
 
class  TaskLogBuffer
 Task log buffer for ESP32 platform using FreeRTOS ring buffer. More...
 

Enumerations

enum  UARTSelection : uint8_t {
  UART_SELECTION_DEFAULT = 0 , UART_SELECTION_UART0 = 0 , UART_SELECTION_UART0 = 0 , UART_SELECTION_UART1 ,
  UART_SELECTION_UART2 , UART_SELECTION_USB_CDC , UART_SELECTION_USB_SERIAL_JTAG , UART_SELECTION_UART0_SWAP
}
 Enum for logging UART selection. More...
 

Functions

 PROGMEM_STRING_TABLE (LogLevelStrings, "NONE", "ERROR", "WARN", "INFO", "CONFIG", "DEBUG", "VERBOSE", "VERY_VERBOSE")
 
void init_uart (uart_port_t uart_num, uint32_t baud_rate, int tx_buffer_size)
 
 __attribute__ ((section(".noinit"))) struct
 
void k_sys_fatal_error_handler (unsigned int reason, const z_arch_esf_t *esf)
 

Variables

Loggerglobal_logger = nullptr
 
 crash_buf
 
__thread bool non_main_task_recursion_guard_
 

Enumeration Type Documentation

◆ UARTSelection

Enum for logging UART selection.

Advanced configuration (pin selection, etc) is not supported.

Enumerator
UART_SELECTION_DEFAULT 
UART_SELECTION_UART0 
UART_SELECTION_UART0 
UART_SELECTION_UART1 
UART_SELECTION_UART2 
UART_SELECTION_USB_CDC 
UART_SELECTION_USB_SERIAL_JTAG 
UART_SELECTION_UART0_SWAP 

Definition at line 104 of file logger.h.

Function Documentation

◆ __attribute__()

esphome::logger::__attribute__ ( (section(".noinit")) )

Definition at line 23 of file logger_zephyr.cpp.

◆ init_uart()

void esphome::logger::init_uart ( uart_port_t uart_num,
uint32_t baud_rate,
int tx_buffer_size )

Definition at line 71 of file logger_esp32.cpp.

◆ k_sys_fatal_error_handler()

void esphome::logger::k_sys_fatal_error_handler ( unsigned int reason,
const z_arch_esf_t * esf )

Definition at line 164 of file logger_zephyr.cpp.

◆ PROGMEM_STRING_TABLE()

esphome::logger::PROGMEM_STRING_TABLE ( LogLevelStrings ,
"NONE" ,
"ERROR" ,
"WARN" ,
"INFO" ,
"CONFIG" ,
"DEBUG" ,
"VERBOSE" ,
"VERY_VERBOSE"  )

Variable Documentation

◆ crash_buf

esphome::logger::crash_buf

Definition at line 31 of file logger_zephyr.cpp.

◆ global_logger

Logger * esphome::logger::global_logger = nullptr

Definition at line 278 of file logger.cpp.

◆ non_main_task_recursion_guard_

__thread bool esphome::logger::non_main_task_recursion_guard_

Definition at line 7 of file task_log_buffer_zephyr.cpp.