Swift Package Index


_The_ E-sites logging framework


  • The latest stable release is v9.0.5. Released 6 months ago.
  • The last commit to master was 6 months ago.

Swift Version Compatibility

  • v9.0.5 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • v9.0.5 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

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
	}
}