diff --git a/esphome/components/logger/logger.cpp b/esphome/components/logger/logger.cpp index 07190cbb88..e633f9fd7d 100644 --- a/esphome/components/logger/logger.cpp +++ b/esphome/components/logger/logger.cpp @@ -70,8 +70,7 @@ void HOT Logger::log_vprintf_(uint8_t level, const char *tag, int line, const ch #ifdef USE_HOST if (!message_sent) { // Host always has console output - no baud_rate check needed - // Use larger buffer for host since memory is plentiful - static const size_t MAX_CONSOLE_LOG_MSG_SIZE = 1024; + static const size_t MAX_CONSOLE_LOG_MSG_SIZE = 512; #else if (!message_sent && this->baud_rate_ > 0) { // If logging is enabled, write to console // Maximum size for console log messages (includes null terminator) diff --git a/esphome/components/logger/task_log_buffer_host.h b/esphome/components/logger/task_log_buffer_host.h index 8a9e9a6455..b9ada2d90d 100644 --- a/esphome/components/logger/task_log_buffer_host.h +++ b/esphome/components/logger/task_log_buffer_host.h @@ -43,9 +43,9 @@ class TaskLogBufferHost { // Structure for a log message (fixed size for lock-free operation) struct LogMessage { - // Size constants - host has plenty of memory, so use larger sizes + // Size constants static constexpr size_t MAX_THREAD_NAME_SIZE = 32; - static constexpr size_t MAX_TEXT_SIZE = 1024; + static constexpr size_t MAX_TEXT_SIZE = 512; const char *tag; // Pointer to static tag string char thread_name[MAX_THREAD_NAME_SIZE]; // Thread name (copied)