Skip to content

Commit

Permalink
Drop canImport(Logging)
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Jul 18, 2023
1 parent 0b600b1 commit 03dc999
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions Sources/Retry/Retry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,6 @@ public protocol RetryLogger {
}


#if canImport(Logging)
import Logging
struct DefaultLogger: RetryLogger {
let logger: Logger

public init(logger: Logger) {
self.logger = logger
}

public func onStartOfRetry(label: String, attempt: Int) {
logger.info("\(label) (attempt \(attempt))")
}

public func onStartOfDelay(delay: Double) {
logger.info("Retrying in \(delay) seconds ...")
}
}
#else
public struct DefaultLogger: RetryLogger {
public init() { }

Expand All @@ -88,6 +70,5 @@ public struct DefaultLogger: RetryLogger {
print("Retrying in \(delay) seconds ...")
}
}
#endif


0 comments on commit 03dc999

Please sign in to comment.