Skip to content

Commit 5f4e51b

Browse files
authored
Merge pull request #5443 from woocommerce/issue/5428-print
[Mobile Payments] Remove print and log to Lumberjack where needed
2 parents c46b107 + a282bfa commit 5f4e51b

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,12 @@ private extension StripeCardReaderService {
408408
/// https://stripe.dev/stripe-terminal-ios/docs/Classes/SCPTerminal.html#/c:objc(cs)SCPTerminal(im)collectPaymentMethod:delegate:completion:
409409

410410
if underlyingError != .commandCancelled {
411-
print("==== collect payment method was not cancelled. this is an actual error ", underlyingError)
411+
DDLogError("💳 Error: collect payment method \(underlyingError)")
412412
promise(.failure(CardReaderServiceError.paymentMethodCollection(underlyingError: underlyingError)))
413413
}
414414

415415
if underlyingError == .commandCancelled {
416-
print("==== collect payment method cancelled. this is an error we ignore ", error)
416+
DDLogWarn("💳 Warning: collect payment error cancelled. We actively ignore this error \(error)")
417417
}
418418

419419
}
@@ -488,12 +488,10 @@ extension StripeCardReaderService: BluetoothReaderDelegate {
488488
}
489489

490490
public func reader(_ reader: Reader, didStartInstallingUpdate update: ReaderSoftwareUpdate, cancelable: StripeTerminal.Cancelable?) {
491-
print("==== started software update")
492491
softwareUpdateSubject.send(.started(cancelable: cancelable.map(StripeCancelable.init(cancelable:))))
493492
}
494493

495494
public func reader(_ reader: Reader, didReportReaderSoftwareUpdateProgress progress: Float) {
496-
print("==== did repost software update progress ", progress)
497495
softwareUpdateSubject.send(.installing(progress: progress))
498496
}
499497

Hardware/HardwareTests/AirPrintReceipt/ReceiptRendererTest.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ final class ReceiptRendererTest: XCTestCase {
2424

2525
let renderer = ReceiptRenderer(content: content)
2626

27-
print(renderer.htmlContent())
28-
2927
XCTAssertEqual(
3028
Insecure.MD5.hash(data: renderer.htmlContent().data(using: .utf8)!).description,
3129
expectedResultWithHtmlSymbolsMd5Description

WooCommerce/Classes/ViewRelated/CardPresentPayments/CardReaderConnectionController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ private extension CardReaderConnectionController {
411411
ServiceLocator.analytics.track(.cardReaderSoftwareUpdateCancelTapped, withProperties: analyticsProperties)
412412
cancelable.cancel { result in
413413
if case .failure(let error) = result {
414-
print("=== error canceling software update: \(error)")
414+
DDLogError("💳 Error: canceling software update \(error)")
415415
} else {
416416
ServiceLocator.analytics.track(.cardReaderSoftwareUpdateCanceled, withProperties: analyticsProperties)
417417
}

WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/CardReaderSettingsConnectedViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ final class CardReaderSettingsConnectedViewModel: CardReaderSettingsPresentedVie
148148
self.track(.cardReaderSoftwareUpdateCancelTapped)
149149
self.softwareUpdateCancelable?.cancel(completion: { [weak self] result in
150150
if case .failure(let error) = result {
151-
print("=== error canceling software update: \(error)")
151+
DDLogError("💳 Error: canceling software update \(error)")
152152
} else {
153153
self?.track(.cardReaderSoftwareUpdateCanceled)
154154
self?.completeCardReaderUpdate(success: false)

Yosemite/Yosemite/Stores/ReceiptStore.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ private extension ReceiptStore {
199199

200200
do {
201201
try fileStorage.write(content, to: outputURL)
202-
Swift.print("new receipt saved: open \(outputURL.path)") // command to open the generated file
203202
} catch {
204203
DDLogError("⛔️ Unable to save receipt for order id: \(order.orderID)")
205204
}

0 commit comments

Comments
 (0)