fix: hook the log lock into log_printfv

The Arduino core already links with --wrap=log_printf for the ESP
Insights hook in libesp_diagnostics, so defining __wrap_log_printf
failed to link with a duplicate definition. That hook prints through
log_printfv, so wrap that instead and take the lock there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-11 22:23:11 +02:00
parent 0610dc4369
commit b6ed24f5bb
2 changed files with 11 additions and 12 deletions

View file

@ -37,8 +37,9 @@ build_flags =
-DCONFIG_ESP_COREDUMP_CHECKSUM_CRC32=1
-DCONFIG_ESP_TASK_WDT_PANIC=1
-DCONFIG_ESP_COREDUMP_DECODE_INFO=1
; Route log_printf through src/LogLock.cpp so lines from both cores don't interleave.
-Wl,--wrap=log_printf
; Route log_printfv through src/LogLock.cpp so lines from both cores don't
; interleave. The core already wraps log_printf for ESP Insights.
-Wl,--wrap=log_printfv
monitor_speed = 115200
monitor_filters =
time