Git Product home page Git Product logo

alamofirelogbook's Introduction

πŸ“’ 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)
  1. 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.

alamofirelogbook's People

Contributors

mikedaoud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.