GithubHelp home page GithubHelp logo

tchigher / timelanecore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from icanzilb/timelanecore

0.0 0.0 0.0 39 KB

Timelane + Core

Home Page: http://timelane.tools

License: MIT License

Swift 100.00%

timelanecore's Introduction

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

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.

timelanecore's People

Contributors

clayellis avatar icanzilb avatar mrs- avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.