Latest 0.1.1
Homepage https://github.com/mikeAttia/AlamofireLogbook
License MIT
Platforms ios 9.0
Dependencies Alamofire
Authors

📒 AlamofireLogbook

An Alamofire network activity logger view

Version
MIT license
Platform
Swift Version
PRs Welcome

Installation

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

pod 'AlamofireLogbook'

Usage

To start logging, import the libraray in your network layer and use the method log() on your Alamofire DataRequest instance like the following example:

import Alamofire
import AlamofireLogbook

Alamofire
.request("https://httpbin.org/get")
.log()
.responseJSON { response in
// Your code
}

If you want to log each request yourself

  1. Conform to AlamofireResponseListener
  2. implement
    recievedResponseFor(item : LogItem)
  3. assign your delegate class in the app delegate to AlamofireLogbook.shared.delegate

OR to show the Network activity logs view just call

AlamofireLogbook.show()

and you’ll get A full searchable log

screenshot_01 screenshot_02 screenshot_03 screenshot_04

💡Tip

Use the action button on the top right of the request details page to copy a readable formatted string of both the request and response. 😉

Example

To try the example project:

run pod try AlamofireLogbook in your ternimal

or

clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 9.0+
  • Xcode 9+
  • Swift 3.2+
  • AlamofireLogbook is a plugin for Alamofire framework

Contributions

If you have some ideas on how to improve the framework, Fork it, implement your changes and create that pull request already 😉.

All contributions are welcome 🤗.

Author

Built with 💙 by mikeAttia

License

AlamofireLogbook is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AlamofireLogbook",
    "version": "0.1.1",
    "summary": "Alamofire network activity logger view",
    "homepage": "https://github.com/mikeAttia/AlamofireLogbook",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "mikeAttia": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mikeAttia/AlamofireLogbook.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.1",
    "source_files": "AlamofireLogbook/Classes/**/*",
    "resource_bundles": {
        "AlamofireLogbook": [
            "AlamofireLogbook/Assets/*.{storyboard,xib,png}"
        ]
    },
    "dependencies": {
        "Alamofire": []
    }
}

Pin It on Pinterest

Share This