Bump swift-log to 1.5.2
This Swift package is a logging backend for SwiftLog. It is usable on Swift Playgrounds.
You need to declare your dependency in your Package.swift:
.package(url: "https://github.com/kkk669/swift-log-playground", from: "0.1.0"),
and to your application/library target, add “LoggingPlayground” to your dependencies, e.g. like this:
.target(name: "YourLibrary", dependencies: [ .product(name: "LoggingPlayground", package: "swift-log-playground") ],
import Logging import LoggingPlayground let logger = Logger(label: "main") LoggingSystem.bootstrap(PlaygroundHandler.init) logger.debug("The program started.")
import Logging import LoggingPlayground import SwiftUI let logger = Logger(label: "main") @main struct MyApp: App { init() { LoggingSystem.bootstrap(PlaygroundHandler.init) } var body: some Scene { WindowGroup { ContentView() } } }
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
LoggingPlayground
This Swift package is a logging backend for SwiftLog. It is usable on Swift Playgrounds.
Adding the dependency
You need to declare your dependency in your Package.swift:
and to your application/library target, add “LoggingPlayground” to your dependencies, e.g. like this:
Example (Playground Book or Xcode Playground)
Example (App Project)