eebdc9c38fc69ef611dd2fc1929a4b052ba4695d
These changes enhance ESPHome's logging system on ESP32 multi-task environments: 1. **Emergency Console Logging**: - Added fallback console logging when the task log buffer is full or disabled - Ensures critical messages are still visible even when the ring buffer fails 2. **Improved Console Output**: - Messages successfully sent to the ring buffer now also display on the console - Ensures consistent console output for all log messages regardless of source 3. **Optimized Resource Usage**: - Release ring buffer messages earlier after transferring to tx_buffer - Reduces contention for the shared log buffer in multi-task environments 1. **Stack Memory Efficiency**: - No longer need to allocate stack memory for console output when ring buffer is available - Only uses stack memory for emergency fallback cases, reducing stack usage in normal operation 2. **Console Output Integrity**: - Prevents console output corruption that could occur with concurrent writes from multiple tasks - Serializes all console output through the main loop when possible 3. **Message Ordering**: - Messages from different tasks may appear slightly out of order due to async delivery to main loop - This trade-off is preferable to corrupted console output from concurrent writes These improvements provide more reliable logging behavior, particularly under memory constraints or high logging volume, while maintaining thread safety and minimizing resource contention.
…
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
190 MiB
Languages
C++
63.9%
Python
35.9%
C
0.1%
