目录
目录README.md

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
    }
}
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号