From 4261124402d6e692eb152a66cf216474e283fffb Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 26 Aug 2026 17:25:53 -0400 Subject: [PATCH] feat(logging): let the benchmark build emit the boot narrative MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `benchmark` build type is a release build (R8 + AOT) that exists purely to be measured and is never shipped, but `DEFAULT_LOG_LEVEL` keyed on `BuildConfig.DEBUG` and so pinned it to WARN. That dropped every INFO milestone a boot narrative is made of — account load timings, Tor status transitions, the BootRelayDiagnostics census — leaving the one variant whose numbers are trustworthy as the one variant we could not read. Key it on `isDebug` instead, which already covers the benchmark type (DebugUtils.kt) and is what gates `BootRelayDiagnostics` itself, so the census and the log level that lets it through can no longer disagree. Release is unaffected and stays at WARN. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01BKYGEp22uGSzWrBDg8fAQ9 --- .../main/java/com/vitorpamplona/amethyst/Amethyst.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt index bdfb4ddc93..0a6ba57941 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt @@ -82,9 +82,14 @@ class Amethyst : Application() { */ val DEFAULT_LOG_LEVEL: LogLevel = when { - !BuildConfig.DEBUG -> LogLevel.WARN - VERBOSE_LOGS -> LogLevel.DEBUG - else -> LogLevel.INFO + // `isDebug` also covers the `benchmark` build type — a release build (R8 + AOT) + // that exists purely to be measured and is never shipped. Treating it as a release + // build left it at WARN, which drops every INFO milestone the boot narrative is + // made of (account load timings, Tor status transitions, the relay census), so the + // one variant whose numbers are trustworthy was also the one we could not read. + VERBOSE_LOGS && isDebug -> LogLevel.DEBUG + isDebug -> LogLevel.INFO + else -> LogLevel.WARN } lateinit var instance: AppModules