TimelaneCore 2.0.0

TimelaneCore 2.0.0

Maintained by Marin Todorov.



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: "1.0.0")

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate TimelaneCore into your Xcode project using CocoaPods, add it to your Podfile:

pod 'TimelaneCore', '~> 2.0'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate TimelaneCore into your Xcode project using Carthage, add it in your Cartfile:

github "icanzilb/TimelaneCore" ~>2.0

Demo

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

License

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