From e6fa47291d020e36fd8a6699486fdd4c3e65843e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 17 Sep 2026 17:22:51 -0600 Subject: [PATCH] Log: give the printf output the same format as the others Headless is the only thing that uses it, and it had its own shorter format with no thread, file or line, so a pattern that matched a log from the app quietly matched nothing in one from headless. Costs a wrong conclusion the first time you do it. Co-Authored-By: Claude Opus 5 (1M context) --- Common/Log/LogManager.cpp | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/Common/Log/LogManager.cpp b/Common/Log/LogManager.cpp index be728c9bcd..d89bdab8bf 100644 --- a/Common/Log/LogManager.cpp +++ b/Common/Log/LogManager.cpp @@ -515,27 +515,8 @@ void LogManager::StdioLog(const LogMessage &message) { } void PrintfLog(const LogMessage &message) { - const char *category = message.log; - - switch (message.level) { - case LogLevel::LVERBOSE: - fprintf(stderr, "V %s: %s", category, message.msg.c_str()); - break; - case LogLevel::LDEBUG: - fprintf(stderr, "D %s: %s", category, message.msg.c_str()); - break; - case LogLevel::LINFO: - fprintf(stderr, "I %s: %s", category, message.msg.c_str()); - break; - case LogLevel::LERROR: - fprintf(stderr, "E %s: %s", category, message.msg.c_str()); - break; - case LogLevel::LWARNING: - fprintf(stderr, "W %s: %s", category, message.msg.c_str()); - break; - case LogLevel::LNOTICE: - default: - fprintf(stderr, "N %s: %s", category, message.msg.c_str()); - break; - } + // Same shape as the stdio and file outputs the other builds use. It used to be its own + // shorter format, which meant a pattern that matched a log from the app quietly matched + // nothing in one from headless. + fprintf(stderr, "%s %s %s", message.timestamp, message.header, message.msg.c_str()); }