Skip to content

Commit

Permalink
Replace print statement with Logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Dec 19, 2024
1 parent 15b0726 commit 1c91259
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/Crashes/CrashReportSender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import Foundation
import MetricKit
import Common
import os.log

public protocol CrashReportSending {
var pixelEvents: EventMapping<CrashReportSenderError>? { get }
Expand Down Expand Up @@ -66,7 +67,9 @@ public final class CrashReportSender: CrashReportSending {
if let response = response as? HTTPURLResponse {
Logger.general.debug("CrashReportSender: Received HTTP response code: \(response.statusCode)")
if response.statusCode == 200 {
response.allHeaderFields.forEach { print("\($0.key): \($0.value)") } // TODO: Why do we straight-up print these, rather than debug logging?
response.allHeaderFields.forEach { headerField in
Logger.general.debug("CrashReportSender: \(String(describing: headerField.key)): \(String(describing: headerField.value))")
}
let receivedCRCID = response.allHeaderFields[CrashReportSender.httpHeaderCRCID]
if receivedCRCID == nil || receivedCRCID as? String == "" {
let crashReportError = CrashReportSenderError.crcidMissing
Expand Down

0 comments on commit 1c91259

Please sign in to comment.