SkillAgentSearch skills...

Glider

✈️ Universal Logging - low overheaded simple & flexible for Swift (iOS, macOS, tvOS)

Install / Use

/learn @immobiliare/Glider
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="./Documentation/assets/glider-dark.png" width="350"> <img alt="logo-library" src="./Documentation/assets/glider-light.png" width="350"> </picture> </p>

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:

What you get

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])

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

Transports

This the list of transport services officially supported.
Third party transports are available into the following separate repositories:

A separate transport is able to capture automatically every network request and forward to other transports:

  • Glider-NetWatcher offers the ability to capture your app's network traffic (including requests/responses) and redirect them to a specific transport.
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="./Documentation/assets/transports-list-dark.png" width="840"> <img alt="logo-library" src="./Documentation/assets/transports-list-light.png" width="840"> </picture> </p>

APIs

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

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.

Contribute

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 supp

Related Skills

View on GitHub
GitHub Stars60
CategoryDevelopment
Updated11mo ago
Forks6

Languages

Swift

Security Score

92/100

Audited on May 4, 2025

No findings