https://github.com/bayer-group/timberswift

A message forwarding framework for sending logs, analytics, performance, network activity, and other messages to the Parent Application

https://github.com/bayer-group/timberswift

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

A message forwarding framework for sending logs, analytics, performance, network activity, and other messages to the Parent Application

Basic Info
  • Host: GitHub
  • Owner: Bayer-Group
  • License: other
  • Language: Swift
  • Default Branch: main
  • Homepage:
  • Size: 65.4 KB
Statistics
  • Stars: 2
  • Watchers: 5
  • Forks: 3
  • Open Issues: 0
  • Releases: 5
Created about 8 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License

README.md

TimberSwift

Carthage Compatible Swift 5.1 Platforms

What is TimberSwift?

A library to send all messages from either frameworks or the parent application to the parent application for consumption. This means the parent application will solely be responsible for sending to: The console, UI toasting, monitoring network activity, sending to Flurry / Google Analytics / Firebase / Crashlytics, some logging solution, or > /dev/null.

Workflows

  • Logging
    • Error, Warning, Debug, Info
    • A console friendly message is passed to the parent application
    • Errors are ALSO passed to a seperate method and are expected to be logged to an error logging solution such as Crashlytics non-fatal logging
  • Analytics
    • Set screen name for workflow
    • Log an event
  • User Messaging
    • Toast messages
  • Performance
    • Measuring the time is takes between starting, incrementating, and stopping a trace.
  • Networking
    • Network Activity

Installation

Carthage

github "MonsantoCo/TimberSwift" ~> 1.0.0

Package Manager

.package(url: "git@github.com:MonsantoCo/TimberSwift.git", from: "1.0.0")

Instructions

Create a Timber object and begin using any or all of the workflows

timber.performance.startTrace(key: "Some Key", properties: ["Some": "Things for the trace"]) timber.performance.incrementTraceCounter(key: "Some Key") timber.performance.stopTrace(key: "Some Key") timber.log.debug("A message", properties: ["More": "Info"]) timber.log.info("A message", properties: ["More": "Info"]) timber.log.warning("A message", properties: ["More": "Info"]) timber.log.error("A message", errorType: .http(statusCode: 500), properties: ["Error": "Info"]) timber.userMessage.toast("Hi There", displayTime: 2.0, type: .success) timber.analytics.setScreen(title: "The Main Map") timber.analytics.recordEvent(title: "Downloading Everything", properties: ["Specific": "Info"]) timber.network.startedActivity() timber.network.endedActivity()

The parent application should assign itself as the TimberApplicationDelegate as soon as possble to receive any and all messages from Timber objects.

func setScreen(title: String, source: Source) func recordEvent(title: String, properties: [String: Any]?, source: Source) func log(_ logMessage: LogMessage) func log(_ error: TimberError) func toast(_ message: String, displayTime: TimeInterval, type: ToastType, source: Source) func startTrace(key: String, identifier: UUID?, properties: [String: Any]?, source: Source) func incrementTraceCounter(key: String, identifier: UUID?, named: String, by count: Int, source: Source) func stopTrace(key: String, identifier: UUID?, source: Source) func networkActivityStarted(source: Source) func networkActivityEnded(source: Source)

Extending TimberSwift in XCode

Option 1: Run with the current XCode project as is

Option 2: Rebuild it using generate-xcodeproj

  • Setup: Package Manager Example: rm -rf *.xcodeproj || rm -rf .build || swift package resolve && swift package generate-xcodeproj && open *.xcodeproj
  • Building: In the Target TimberSwift, select the tab Signing & Capabilities and check the box Automatically manage signing
  • Code Coverage: In the scheme menu, select Edit Scheme..., select the Test item on the left, select the tab Options, and check the box Gather coverage for "all targets"
  • Mocking: In the target TimberSwiftTests select the tab Build Phases and add a Run Script Phase with the body $PROJECT_DIR/Scripts/parrot.sh and move the item to the top of the Buld Phases just below Dependencies.
  • Linting: In the target TimberSwift select the tab Build Phases and add a Run Script Phase with the body $PROJECT_DIR/Scripts/swiftlint.sh.

Owner

  • Name: Bayer Open Source
  • Login: Bayer-Group
  • Kind: organization

Science for a better life

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 10
  • Total Committers: 2
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.1
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Vernon R Schierding III s****g@g****m 9
Nickola 1****v 1

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.13
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • schlingding (6)
  • NickolaAndriiev (2)
  • kant (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
swiftpackageindex.com: github.com/Bayer-Group/TimberSwift

A message forwarding framework for sending logs, analytics, performance, network activity, and other messages to the Parent Application

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 15.4%
Dependent repos count: 24.8%
Average: 39.7%
Forks count: 39.9%
Stargazers count: 78.6%
Last synced: 11 months ago

Dependencies

Package.swift swiftpm