An Alamofire network activity logger view

Overview

📒 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.

You might also like...
A simple logger for your swift applications.

AHQSLogger A simple logging system. Usage import AHQSLogger Use the following methods for loggging. Logging an information / debug You can log a simp

Tracker - A simple location logger app written in Swift and MVVM architecture
Tracker - A simple location logger app written in Swift and MVVM architecture

Tracker - A simple location logger app written in Swift and MVVM architecture

Log every incoming notification to view them again later, also includes attachments and advanced settings to configure

VÄ“ Natively integrated notification logger Installation Add this repository to your package manager

Simple network activity logger for iOS
Simple network activity logger for iOS

Reqres is a simple library for logging all requests and responses in your app. It supports Alamofire and also requests made via native NSURLSession. ⬆

Logger - This package is a thin wrapper for `os.Logger`

Logger This package is a thin wrapper for os.Logger. Usage Define os.Logger as an extension of Logger with the property name of the string that the sy

A network logger for iOS and macOS projects.

OkLog for iOS and macOS OkLog-Swift is a network logger written in Swift highly inspired by simonpercic's original OkLog implementation to be used in

Automatically sets the network activity indicator for any performed request.

BigBrother BIG BROTHER IS WATCHING YOU. BigBrother is a Swift library made for iOS that automatically watches for any performed request and sets the n

Lightweight network abstraction layer, written on top of Alamofire
Lightweight network abstraction layer, written on top of Alamofire

TRON is a lightweight network abstraction layer, built on top of Alamofire. It can be used to dramatically simplify interacting with RESTful JSON web-

Alamofire network layer

NVNetworkRequest Alamofire network layer Installation Add this to your Package dependencies: dependencies: [ .package(url: "https://github.com/vin

Alamofire Network Layer written in swift 5 using the protocol oriented, combine, UIKit, MVVM.

CoreAPI-iOS This project Contains Alamofire Network layer Based on Protocol Oriented Concept and Combine Framework. It is created with UIKit, Alamofir

Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!
Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!

OHHTTPStubs OHHTTPStubs is a library designed to stub your network requests very easily. It can help you: test your apps with fake network data (stubb

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.
Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application. Install Carthage

Network debugging made easy,This network debugging tool is developed based on the swift version of Wormholy.
Network debugging made easy,This network debugging tool is developed based on the swift version of Wormholy.

Start debugging iOS network calls like a wizard, without extra code! Wormholy makes debugging quick and reliable. What you can do: No code to write an

A network extension app to block a user input URI. Meant as a network extension filter proof of concept.
A network extension app to block a user input URI. Meant as a network extension filter proof of concept.

URIBlockNE A network extension app to block a user input URI. Meant as a network extension filter proof of concept. This is just a research effort to

Say goodbye to the Fat ugly singleton Network Manager with this Network Layer

MHNetwork Protocol Oriented Network Layer Aim to avoid having bloated singleton NetworkManager Philosophy the main philosophy behind MHNetwork is to h

NWReachability - a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

NWReachability is a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder
Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

SwiftUI App to view the App Activity Record from iOS 15
SwiftUI App to view the App Activity Record from iOS 15

App Activity Viewer A viewer for the iOS 15 "Record App Activity" export. FAQ How do I create an App Activity Report? Go to the "Settings" app of your

SwiftUI view that download and display image from URL and displaying Activity Indicator while loading .

ViewWithActivityIndicator ViewWithActivityIndicator is a SwiftUI view that download and display image from URL and displaying Activity Indicator while

Comments
  • Add support for persistence

    Add support for persistence

    Hey, awesome lib! It's really helpful. To be even better, would be cool the add an option to persist the request/response somehow (with userdefaults or keychain), even if the user closes the app. Thanks!

    enhancement 
    opened by ricardohochman 0
Releases(0.1.1)
Owner
Michael Daoud
Michael Daoud
Logger - This package is a thin wrapper for `os.Logger`

Logger This package is a thin wrapper for os.Logger. Usage Define os.Logger as an extension of Logger with the property name of the string that the sy

treastrain / Tanaka Ryoga 5 Jul 1, 2022
A network logger for iOS and macOS projects.

OkLog for iOS and macOS OkLog-Swift is a network logger written in Swift highly inspired by simonpercic's original OkLog implementation to be used in

Diego Trevisan Lara 18 Dec 24, 2021
A fancy logger yet lightweight, and configurable. 🖨

?? ?? Important: Printer can only print console logs if you're running an app in the Simulator. If you're running in a real device it will not print a

Hemang 66 Dec 7, 2022
Bugfender SDK for iOS, a remote logger tailor-made for mobile

Bugfender SDK for iOS Bugfender is a cloud service to collect mobile application logs. Developers can control log sending programmatically and manuall

Bugfender 69 Dec 4, 2022
LogDog is designed to work out of the box, you can use the pre-configured logger anytime, anywhere

LogDog user-friendly logging apple/swift-log api compatible Usage LogDog is designed to work out of the box, you can use the pre-configured logger any

Luo Xiu 21 Aug 14, 2022
Logger for Xcode

CSwiftLog Usage Log.log("Message text without category") Log.my.log("Message text with custom category") Log.network.log("Message text with network ca

Andrew Firsenko 2 Nov 29, 2021
A custom logger implementation and Task Local helper for swift-log

LGNLog A custom logger implementation and TaskLocal helper for Swift-Log. Why and how This package provides two and a half things (and a small bonus):

17:11 Games 0 Oct 26, 2021
A lightweight Swift logger, uses `print` in development and `NSLog` in production. Support colourful and formatted output.

Loggerithm A lightweight Swift logger, uses print in Debug and NSLog in Production with colourful output. Why In Swift, we usually use print to log in

HongHao Zhang 270 Oct 8, 2022
Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux in Swift.

Lighty Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux in Swift. Screenshots Requirements Lighty Version Minimum iOS Target

Abdullah Selek 51 Dec 21, 2022
Stock tradings Logger app for iOS

Stock Logger Contributor: Name: Prof. Darren Takaki Author: Name: Ibrahim (Wusiman Yibulayin) Student ID: 0728356 Table of contents Description Gettin

null 2 Jul 28, 2022