You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Best for scenarios where you want predictable, fixed delays between retries:
@@ -315,6 +330,93 @@ The total retry count is calculated automatically from the sum of all entries
315
330
316
331
Each strategy in the chain uses **local indexing**, meaning every phase starts its delay calculation from zero. This ensures each strategy behaves predictably regardless of its position in the chain.
317
332
333
+
## Logging
334
+
335
+
Typhoon provides a lightweight logging abstraction that allows you to integrate retry diagnostics into your existing logging system.
336
+
337
+
The framework defines a simple ILogger protocol:
338
+
339
+
```
340
+
public protocol ILogger: Sendable {
341
+
func info(_ message: String)
342
+
func warning(_ message: String)
343
+
func error(_ message: String)
344
+
}
345
+
```
346
+
347
+
You can plug in any logging framework by implementing this protocol.
348
+
349
+
### Using Apple's OSLog
350
+
351
+
Typhoon includes built-in support for Apple's OSLog system via Logger:
352
+
353
+
```
354
+
import Typhoon
355
+
import OSLog
356
+
357
+
let logger = Logger(subsystem: "com.example.network", category: "retry")
0 commit comments