Swiftpack.co - infinum/ios-loggie as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by infinum.
infinum/ios-loggie 2.4.3
Simplify debugging by showing network requests of your app as they happen.
⭐️ 30
🕓 1 week ago
.package(url: "https://github.com/infinum/ios-loggie.git", from: "2.4.3")


Build Status Version License Swift Package Manager Platform



Loggie is a simple in-app network logging library that gives the developers and the QA testers a possibility to log network. The library is handy for easily accessible list of network trafic.


  • Xcode 10
  • iOS 11



Loggie is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Loggie'

By default, network debugging will be available for the URLSession. If you want to use Loggie with Alamofire, please use:

pod 'Loggie/Alamofire'

Swift Package Manager

If you are using SPM for your dependency manager, add this to the dependencies in your Package.swift file:

dependencies: [
    .package(url: "https://github.com/infinum/ios-loggie.git")


To run the example project, clone the repo, and run pod install from the Examples/Cocoapods directory first.


1. Register custom LoggieURLProtocol in the application:didFinishLaunchingWithOptions method:

// Swift
// Objective-C
[NSURLProtocol registerClass:[LoggieURLProtocol class]];

2. If you use NSURLSession (or AFNetworking/Alamofire) make sure that you use loggieSessionConfiguration:

// Swift
URLSession(configuration: URLSessionConfiguration.loggie)
// Objective-C
[NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration loggieSessionConfiguration]];

3. At the point where you want to display network logs, you can just put the following line:

// Swift
LoggieManager.shared.showLogs(from: viewController)
// Objective-C
[[LoggieManager sharedManager] showLogsFromViewController:viewController filter:nil];

You can create custom output or UI to show network logs. To get an array of all network logs just call:

// Swift
let logs = LoggieManager.shared.logs
// Objective-C
NSArray<Log *> *array = [[LoggieManager sharedManager] logs];

If you would like to receive notifications when new logs are added to the list, your app can observe LoggieDidUpdateLogs notification.


Please make sure that LogieURLProtocol and loggieSessionConfiguration are not used in production builds.


Filip Beć, [email protected]


Maintained and sponsored by Infinum.

Infinum logo


Loggie is available under the MIT license. See the LICENSE file for more information.


Stars: 30
Last commit: 6 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.


Release Notes

6 days ago

This release contains the following changes:

  • Fixed dispatch to the main queue when updating logs list (#39)

Also, we migrated from Bitrise to GitHub Actions for easier maintenance and build transparency.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics