The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.
Once you have your Swift package set up, adding AlamofireNetworkActivityLogger as a dependency is as easy as adding it to the dependencies value of your Package.swift.
AlamofireNetworkActivityLogger
Network activity logger for Alamofire.
Requirements
Dependencies
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
To integrate AlamofireNetworkActivityLogger into your Xcode project using CocoaPods, specify it in your
Podfile
:Then, run the following command:
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
To integrate AlamofireNetworkActivityLogger into your Xcode project using Carthage, specify it in your
Cartfile
:Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the
swift
compiler.Once you have your Swift package set up, adding AlamofireNetworkActivityLogger as a dependency is as easy as adding it to the
dependencies
value of yourPackage.swift
.Usage
Import the library:
Add the following code to
AppDelegate.swift application:didFinishLaunchingWithOptions:
:Now all NSURLSessionTask objects created by an Alamofire.Session will have their request and response logged to the console, a la:
If the default logging level is too verbose—say, if you only want to know when requests fail—then changing it is as simple as:
Contact
Konstantin Kabanov
License
AlamofireNetworkActivityLogger is released under the MIT license. See LICENSE for details.