diff options
| author | Christian Cleberg <[email protected]> | 2026-04-12 10:11:21 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-12 10:11:21 -0500 |
| commit | c0744a35891f89e50ab407a0b8557ce9d5c5e6cc (patch) | |
| tree | e4b40e8425ded8213be34ba31286fb723dcb8ccb /Hutch/Networking | |
| parent | 9050405b4f33b2b9b70458fcf3e43b80c940eef7 (diff) | |
| download | hutch-c0744a35891f89e50ab407a0b8557ce9d5c5e6cc.tar.gz hutch-c0744a35891f89e50ab407a0b8557ce9d5c5e6cc.tar.bz2 hutch-c0744a35891f89e50ab407a0b8557ce9d5c5e6cc.zip | |
chore: clean up debug loggingv2.15.1
Diffstat (limited to 'Hutch/Networking')
| -rw-r--r-- | Hutch/Networking/HutchStatsService.swift | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/Hutch/Networking/HutchStatsService.swift b/Hutch/Networking/HutchStatsService.swift index cb08715..69a2a20 100644 --- a/Hutch/Networking/HutchStatsService.swift +++ b/Hutch/Networking/HutchStatsService.swift @@ -20,7 +20,6 @@ struct HutchStatsService: ContributionCalendarServing { } func fetchContributionCalendar(actor: String, endingOn endDate: Date) async throws -> ContributionCalendarResponse { - debugLog("calendar request actor=\(actor) endDate=\(Self.rangeFormatter.string(from: endDate))") return try await fetch( path: "api/contributions/\(actor)", queryItems: trailingYearQueryItems(endingOn: endDate), @@ -29,7 +28,6 @@ struct HutchStatsService: ContributionCalendarServing { } func fetchContributionStats(actor: String, endingOn endDate: Date) async throws -> ContributionStatsResponse { - debugLog("stats request actor=\(actor) endDate=\(Self.rangeFormatter.string(from: endDate))") return try await fetch( path: "api/contributions/\(actor)/stats", queryItems: trailingYearQueryItems(endingOn: endDate), @@ -53,17 +51,14 @@ struct HutchStatsService: ContributionCalendarServing { throw URLError(.badURL) } - debugLog("request \(url.absoluteString)") let (data, response): (Data, URLResponse) do { (data, response) = try await session.data(from: url) } catch { - debugLog("network failure \(url.absoluteString) error=\(error.localizedDescription)") throw SRHTError.networkError(error) } if let httpResponse = response as? HTTPURLResponse { - debugLog("response \(url.absoluteString) status=\(httpResponse.statusCode) bytes=\(data.count)") if !(200...299).contains(httpResponse.statusCode) { throw SRHTError.httpError(httpResponse.statusCode) } @@ -72,8 +67,6 @@ struct HutchStatsService: ContributionCalendarServing { do { return try decoder.decode(responseType, from: data) } catch { - let preview = String(decoding: data.prefix(300), as: UTF8.self) - debugLog("decode failure \(url.absoluteString) error=\(error.localizedDescription) body=\(preview)") throw SRHTError.decodingError(error) } } @@ -113,9 +106,4 @@ struct HutchStatsService: ContributionCalendarServing { return formatter }() - private func debugLog(_ message: String) { -#if DEBUG - print("[HutchStatsService] \(message)") -#endif - } } |
