A logging middleware package for Swift OpenAPI Generator/Runtime that provides detailed request and response logging capabilities. Uses system OSLog. The library is nothing special, just simple reusable package, that you can easily add to a project and remove from it once no longer needed. Or just turn logging off.
- 📝 Comprehensive request and response logging
 - ⚡️ Pretty printed
 - 🔧 Configurable logging levels and formats
 - 🎯 Non-intrusive middleware design
 
Add the following to your Package.swift file:
dependencies: [
    .package(url: "https://github.com/laconicman/OSLogLoggingMiddleware.git", from: "1.0.0")
]Then add the dependency to your target:
targets: [
    .target(
        name: "YourTarget",
        dependencies: [
            .product(name: "OSLogLoggingMiddleware", package: "OSLogLoggingMiddleware")
        ]
    )
]import OSLogLoggingMiddleware
import OpenAPIRuntime
let client = Client(
    serverURL: URL(string: "https://api.example.com")!,
    middleware: [
        OSLogLoggingMiddleware()
    ]
)Contributions are welcome!
- swift-openapi-generator - The main Swift OpenAPI Generator project
 - swift-openapi-runtime - Runtime library for Swift OpenAPI Generator
 
This project is licensed under the Apache License 2.0.