Swiftpack.co - e-sites/Lithium as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by e-sites.
e-sites/Lithium v9.0.5
_The_ E-sites logging framework
⭐️ 2
🕓 3 years ago
iOS
.package(url: "https://github.com/e-sites/Lithium.git", from: "v9.0.5")

Lithium

Lithium is part of the E-sites iOS Suite.


The E-sites logging framework.

forthebadge forthebadge

Travis-ci

Installation

SwiftPM

package.swift dependency:

.package(url: "https://github.com/e-sites/lithium.git", from: "9.0.0"),

and to your application/library target, add "Lithium" to your dependencies, e.g. like this:

.target(name: "BestExampleApp", dependencies: ["Lithium"]),

Implementation

Initialization

import Lithium

let logger: Logger = {
    var ll = Logger(label: "com.swift-log.awesome-app")
    ll.logLevel = .trace
    return ll
}()

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    
		LoggingSystem.bootstrap { label -> LogHandler in
			var lithiumLogger = LithiumLogger(label: label)
			lithiumLogger.theme = EmojiLogTheme()
			return lithiumLogger
		}
	    
		return true
	}
}

GitHub

link
Stars: 2
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

v7.1.2
3 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics