Swiftpack.co - immobiliare/Glider as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by immobiliare.
immobiliare/Glider 1.0.1
✈️ Universal Logging - fast & simple, yet powerful & flexible for Swift (iOS, macOS, tvOS, watchOS)
⭐️ 21
🕓 3 days ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/immobiliare/Glider.git", from: "1.0.1")

logo-library

Swift Platform Swift Package Manager CocoaPods Compatible

Glider is the logger for just about everything! It's designed to be:

  • SIMPLE: with a modular & extensible architecture, fully documented
  • PERFORMANT: you can use Glider without the worry of impacting your app performances
  • UNIVERSAL: it supports 14+ transports to satisfy every need; you can create your transport too!

Why Logging?

Logging and monitoring are fundamental parts of our job as engineers.
Especially in the mobile world (with very heterogeneous environments), you'll often find yourself in a situation where understanding how your software behaves in production is essential.

That's the right job for logging: logged data provide valuable information that would be difficult to gather otherwise, unveil unexpected behaviors and bugs, and even if the data was adequately anonymized, identify the sequences of actions of singular users.

Feature Highlights

We loved making this open-source package and would see engineers like you using this software.
Those are five reasons you will love Glider:

One Line Implementation

Creating a logger is simple.
Each logger is an instance of the Log class; typically, you need to specify one or more transports (where the data is stored).

let logger = Log {
 $0.subsystem = "com.my-awesome-app"
 $0.category = "ui-events"
 $0.level = .info
 $0.transports = [ConsoleTransport()]
}

The following logger shows received messages - only warning or more severe - in the console.

// Logs an error (including stack trace)
logger.error?.write("Unexpected error has occurred!", 
                    extra: ["reason": error.localizedDescription, "info": extraInfoDict])

logger.info?.write { // Logs an event with a set of attached details
  $0.message = "User tapped Buy button"
  $0.object = encodableProduct
  $0.extra = ["price": price, "currency": currency]
  $0.tags = ["productId", pID]
}

API Reference

Glider is fully documented at source-code level. You'll get autocomplete with doc inside XCode for free; moreover, you can read the full Apple's DoCC Documentation automatically generated by Swift Package Index project from here:

👉 API REFERENCE
👉 PROJECT PAGE

Guide

The following manual will guide you through using Glider for your project.

Introduction

Event Formatters

Data Transports

Network Sniffer

NetWatcher package offers the ability to capture your app's network traffic (including requests/responses) and redirect them to a specific transport.
It's fully integrated with Glider and simple to use.

Test Suite

Glider offers an extensive suite of unit tests for Glider Core Logger and third-party packages under the /Tests folder.

Moreover, the entire package is powered by SwiftLint for better code quality. src="https://raw.github.com/immobiliare/Glider/main/lp Us!

If you want to join this project, we're maintaining a list of new features we would like to implement into the following versions of Glider. Please open an issue and discuss one of them with us!

  • ☐ GliderViewer: a macOS, iPad & iPhone app to view and interact with logged data
  • ☐ New Transports: we would like to extend the list of supported transports; feel free to propose your third-party transports
  • ☐ Increment our code coverage by writing more tests

Requirements

Glider can be installed on any platform which supports:

  • iOS 14+, macOS Catalina+, watchOS 7+, tvOS 13+
  • Xcode 13.2+
  • Swift 5.5+

Installation

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Glider does support its use on supported platforms.

Once you have your Swift package set up, adding Glider as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/immobiliare/Glider.git")
]

Manifest also includes third-party packages for other transports, like ELK or Sentry.
The Glider core SDK is the Glider package.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.
To integrate Glider into your project, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

pod 'GliderLogger'

Note Not all packages are available via CocoaPods:

are available only via SPM.

Powered Apps

Glider was created by the amazing mobile team at ImmobiliareLabs, the Tech dept at Immobiliare.it. We are currently using Glider for logging in to all of our products.

If you are using Glider in your app drop us a message

Support & Contribute

Made with ❤️ by ImmobiliareLabs & Contributors

We'd love for you to contribute to Glider!
If you have questions on using Glider, bugs, and enhancement, please feel free to reach out by opening a GitHub Issue.

Indomio

GitHub

link
Stars: 21
Last commit: 3 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.0.0
2 weeks ago

Released on 2022-09-12

This is the first public stable release. All APIs definitions are completed and all required features are present.
We're using it in production on Immobiliare/Indomio mobile applications.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics