TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Feb 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Logging HTTP Request of NSURLSession.
HTTPLogger.register()
let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
HTTPLogger.setup(configuration)
// Sample Alamofire
Alamofire.Manager(configuration: configuration)
struct Configuration: HTTPLoggerConfigurationType {
func printLog(string: String) {
NSLog(string)
}
public func enableCapture(request: NSURLRequest) -> Bool {
#if DEBUG
return true
#else
return false
#endif
}
}
HTTPLogger.configuration = Configuration()
HTTPLogger is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "HTTPLogger"
muukii, [email protected]
HTTPLogger is available under the MIT license. See the LICENSE file for more info.