mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 17:18:40 +00:00
reduce ram
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user