ESPHome  2024.4.1
Data Structures | Enumerations | Functions | Variables
esphome::logger Namespace Reference

Data Structures

class  Logger
 
class  LoggerMessageTrigger
 

Enumerations

enum  UARTSelection {
  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

void init_uart (uart_port_t uart_num, uint32_t baud_rate, int tx_buffer_size)
 

Variables

const char *const LOG_LEVELS [] = {"NONE", "ERROR", "WARN", "INFO", "CONFIG", "DEBUG", "VERBOSE", "VERY_VERBOSE"}
 
Loggerglobal_logger = nullptr
 
const char *const UART_SELECTIONS []
 

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 33 of file logger.h.

Function Documentation

◆ init_uart()

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

Definition at line 64 of file logger_esp32.cpp.

Variable Documentation

◆ global_logger

Logger * esphome::logger::global_logger = nullptr

Definition at line 179 of file logger.cpp.

◆ LOG_LEVELS

const char* const esphome::logger::LOG_LEVELS[] = {"NONE", "ERROR", "WARN", "INFO", "CONFIG", "DEBUG", "VERBOSE", "VERY_VERBOSE"}

Definition at line 163 of file logger.cpp.

◆ UART_SELECTIONS

const char *const esphome::logger::UART_SELECTIONS
Initial value:
= {
"UART0", "UART1",
#ifdef USE_ESP32_VARIANT_ESP32
"UART2",
#endif
#ifdef USE_LOGGER_USB_CDC
"USB_CDC",
#endif
#ifdef USE_LOGGER_USB_SERIAL_JTAG
"USB_SERIAL_JTAG",
#endif
}

Definition at line 184 of file logger_esp32.cpp.