Merge remote-tracking branch 'upstream/fix-logger-init-order-14970' into integration

This commit is contained in:
J. Nick Koston
2026-03-19 10:34:27 -10:00
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ CONFIG_SCHEMA = cv.All(
)
@coroutine_with_priority(CoroPriority.LOGGER_INIT)
@coroutine_with_priority(CoroPriority.EARLY_INIT)
async def to_code(config: ConfigType) -> None:
baud_rate: int = config[CONF_BAUD_RATE]
level = config[CONF_LEVEL]
+4 -4
View File
@@ -63,11 +63,11 @@ class CoroPriority(enum.IntEnum):
resolution during code generation.
"""
# Logger early init - must run before all other code because:
# 1. All code assumes global_logger is ready for ESP_LOG* calls
# 2. Without this, any log call before logger init dereferences nullptr
# Early init - runs before platform init and before Application exists.
# Currently used only to connect logging so ESP_LOG* calls work
# immediately in all subsequent phases.
# Examples: logger (1100)
LOGGER_INIT = 1100
EARLY_INIT = 1100
# Platform initialization
# Examples: esp32, esp8266, rp2040