Swiftpack.co - Package - icanzilb/TimelaneCore

Timelane Core

Timelane Icon

The core logging package for Timelane

You would usually use a higher level package which provides helpers to use with certain libraries like TimelaneCombine.

In case you would like to report events directly to Timelane or you'd like to add Timelane support for a new library, this is the package to consider.

Logging subscriptions

To plot a lane for a subscription called "My Subscription":

// Subscription begin
let subscription = Timelane.Subscription(name: "My Subscription")
subscription.begin(source: "MyFile.swift:120")

// Successfully end subscription
subscription.end(state: .completed)

// End with failure
subscription.end(state: .error("Error Message"))

Logging events

To plot a lane with the values and events for a subscription called "My Subscription":

let subscription = Timelane.Subscription(name: "My Subscription")

subscription.event(value: .value(String(describing: 10)), source: "MyFile.swift:120")
subscription.event(value: .value(String(describing: 20)), source: "MyFile.swift:120")

subscription.end(state: .completed)
// or
subscription.end(state: .error("My Error"))

Installation

Swift Package Manager

I . Automatically in Xcode:

  • Click File > Swift Packages > Add Package Dependency...
  • Use the package URL https://github.com/icanzilb/TimelaneCore to add TimelaneCombine to your project.

II . Manually in your Package.swift file add:

.package(url: "https://github.com/icanzilb/TimelaneCore", .from("0.9.0"))

Demo

The Timelane package contains a demo app at: https://github.com/icanzilb/timelane.

Todo

  • ☐ CocoaPods
  • ☐ Carthage

License

Copyright (c) Marin Todorov 2020 This package is provided under the MIT License.

Github

link
Stars: 2

Dependencies

Used By

Total: 0

Releases

Prerelease.2 - 2020-02-19 13:00:14

Prerelease.2

Prerelease.1 - 2020-02-13 21:02:08

Pre-release version 1