mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 19:28:25 +00:00
feat(logging): let the benchmark build emit the boot narrative
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BKYGEp22uGSzWrBDg8fAQ9
This commit is contained in:
co-authored by
Claude Opus 5
parent
ef4e7075be
commit
4261124402
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user