ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::logger::LogBuffer Struct Reference

#include <log_buffer.h>

Public Member Functions

void terminate_with_newline ()
 
void HOT write_header (uint8_t level, const char *tag, int line, const char *thread_name)
 
void HOT format_body (const char *format, va_list args)
 
void HOT format_body_p (PGM_P format, va_list args)
 
void write_replay_header (uint8_t level, uint32_t ms)
 
void write_body (const char *text, uint16_t text_length)
 

Data Fields

char * data
 
uint16_t size
 
uint16_t pos {0}
 

Static Public Attributes

static constexpr uint16_t ANSI_COLOR_LEN = 7
 
static constexpr uint16_t ANSI_RESET_LEN = 4
 
static constexpr uint16_t REPLAY_HEADER_MAX_SIZE = ANSI_COLOR_LEN + 1 + 10 + 3
 

Detailed Description

Definition at line 38 of file log_buffer.h.

Member Function Documentation

◆ format_body()

void HOT esphome::logger::LogBuffer::format_body ( const char * format,
va_list args )
inline

Definition at line 107 of file log_buffer.h.

◆ format_body_p()

void HOT esphome::logger::LogBuffer::format_body_p ( PGM_P format,
va_list args )
inline

Definition at line 112 of file log_buffer.h.

◆ terminate_with_newline()

void esphome::logger::LogBuffer::terminate_with_newline ( )
inline

Definition at line 45 of file log_buffer.h.

◆ write_body()

void esphome::logger::LogBuffer::write_body ( const char * text,
uint16_t text_length )
inline

Definition at line 134 of file log_buffer.h.

◆ write_header()

void HOT esphome::logger::LogBuffer::write_header ( uint8_t level,
const char * tag,
int line,
const char * thread_name )
inline

Definition at line 54 of file log_buffer.h.

◆ write_replay_header()

void esphome::logger::LogBuffer::write_replay_header ( uint8_t level,
uint32_t ms )
inline

Definition at line 122 of file log_buffer.h.

Field Documentation

◆ ANSI_COLOR_LEN

uint16_t esphome::logger::LogBuffer::ANSI_COLOR_LEN = 7
staticconstexpr

Definition at line 117 of file log_buffer.h.

◆ ANSI_RESET_LEN

uint16_t esphome::logger::LogBuffer::ANSI_RESET_LEN = 4
staticconstexpr

Definition at line 118 of file log_buffer.h.

◆ data

char* esphome::logger::LogBuffer::data

Definition at line 39 of file log_buffer.h.

◆ pos

uint16_t esphome::logger::LogBuffer::pos {0}

Definition at line 41 of file log_buffer.h.

◆ REPLAY_HEADER_MAX_SIZE

uint16_t esphome::logger::LogBuffer::REPLAY_HEADER_MAX_SIZE = ANSI_COLOR_LEN + 1 + 10 + 3
staticconstexpr

Definition at line 120 of file log_buffer.h.

◆ size

uint16_t esphome::logger::LogBuffer::size

Definition at line 40 of file log_buffer.h.


The documentation for this struct was generated from the following file: