Latest 1.0.4
Homepage https://github.com/Digipolitan/alamofire-logging
License BSD
Platforms ios 8.0, watchos 2.0, tvos 9.0, osx 10.10
Dependencies Alamofire

Alamofire+Logging

Swift Version
Build Status
CocoaPods Compatible
Carthage Compatible
Swift Package Manager Compatible
Platform
Twitter

Logging support for Alamofire

Installation

CocoaPods

To install Alamofire+Logging with CocoaPods, add the following lines to your Podfile.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

pod 'AlamofireLogging'

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:

$ brew update
$ brew install carthage

To integrate Alamofire+Logging into your Xcode project using Carthage, specify it in your Cartfile:

github 'Digipolitan/alamofire-logging' ~> 1.0

Run carthage update to build the framework and drag the built AlamofireLogging.framework into your Xcode project.

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 Alamofire+Logging as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/Digipolitan/alamofire-logging.git", from: "1.0.0")
]

How to use ?

SessionManager.default.request("http://date.jsontest.com").log(level: .verbose).responseJSON { (response) in
  switch response.result {
    case .success(let value):
      print("Alamofire (value)")
    case .failure(let error):
      print("(error)")
    }
}

There is multiple level of logs:

  • none: Does not show any logs
  • simple: Only logs the url
  • verbose: Logs all the content of the HTTP request such as headers, body, query, …

Contributing

See CONTRIBUTING.md for more details!

This project adheres to the Contributor Covenant Code of Conduct.
By participating, you are expected to uphold this code. Please report
unacceptable behavior to [email protected].

License

Alamofire+Logging is licensed under the BSD 3-Clause license.

Latest podspec

{
    "name": "AlamofireLogging",
    "version": "1.0.4",
    "summary": "Logging support for Alamofire",
    "homepage": "https://github.com/Digipolitan/alamofire-logging",
    "authors": "Digipolitan",
    "source": {
        "git": "https://github.com/Digipolitan/alamofire-logging.git",
        "tag": "v1.0.4"
    },
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    },
    "source_files": "Sources/**/*.{swift,h}",
    "platforms": {
        "ios": "8.0",
        "watchos": "2.0",
        "tvos": "9.0",
        "osx": "10.10"
    },
    "swift_version": "4.2",
    "dependencies": {
        "Alamofire": [
            "~> 4.8"
        ]
    }
}

Pin It on Pinterest

Share This