From f95df91d6d76d4199f0063079437c793845fc271 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 22:15:29 +0000 Subject: [PATCH] chore(quartz): drop AdaptiveRelayLimiter + relay-URL rejection logs to debug The per-relay concurrency/rate throttle notices and the "Rejected " normalizer messages fire constantly during a large crawl (thousands of rejected/throttled relays) and are operational detail, not warnings. Move them from Log.w to Log.d so they stay available under debug logging without flooding a normal run. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01RWk2ZMrGBSr4WenKgwqmbB --- .../relay/client/accessories/AdaptiveRelayLimiter.kt | 4 ++-- .../quartz/nip01Core/relay/normalizer/RelayUrlNormalizer.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/AdaptiveRelayLimiter.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/AdaptiveRelayLimiter.kt index c66134480f..977767fade 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/AdaptiveRelayLimiter.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/AdaptiveRelayLimiter.kt @@ -150,7 +150,7 @@ class AdaptiveRelayLimiter( val cap = subLadder[(step - 1).coerceIn(0, subLadder.size - 1)] gate(relay).lower(cap) if (step <= subLadder.size) { - Log.w("AdaptiveRelayLimiter") { "${relay.url} concurrency capped at $cap subs (sub-limit #$step)" } + Log.d("AdaptiveRelayLimiter") { "${relay.url} concurrency capped at $cap subs (sub-limit #$step)" } } } @@ -161,7 +161,7 @@ class AdaptiveRelayLimiter( val d = rateLadder[(step - 1).coerceIn(0, rateLadder.size - 1)] rateDelayMs[relay] = d if (step <= rateLadder.size) { - Log.w("AdaptiveRelayLimiter") { "${relay.url} rate-throttled to 1 REQ / ${d}ms (rate-limit #$step)" } + Log.d("AdaptiveRelayLimiter") { "${relay.url} rate-throttled to 1 REQ / ${d}ms (rate-limit #$step)" } } } diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/normalizer/RelayUrlNormalizer.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/normalizer/RelayUrlNormalizer.kt index 81b08a9666..04f8c9cc06 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/normalizer/RelayUrlNormalizer.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/normalizer/RelayUrlNormalizer.kt @@ -156,7 +156,7 @@ class RelayUrlNormalizer { if (trimmed.contains("://")) { // some other scheme we cannot connect to. - Log.w("RelayUrlNormalizer") { "Rejected $url" } + Log.d("RelayUrlNormalizer") { "Rejected $url" } return null } @@ -189,14 +189,14 @@ class RelayUrlNormalizer { normalizedUrls.put(url, NormalizationResult.Success(normalized)) normalized } else { - Log.w("NormalizedRelayUrl") { "Rejected $url" } + Log.d("NormalizedRelayUrl") { "Rejected $url" } normalizedUrls.put(url, NormalizationResult.Error) null } } catch (e: Exception) { if (e is CancellationException) throw e normalizedUrls.put(url, NormalizationResult.Error) - Log.w("NormalizedRelayUrl") { "Rejected $url" } + Log.d("NormalizedRelayUrl") { "Rejected $url" } null } }