Merge pull request #1 from ericlewis/release/1.0 chore: bump to 1.0
Merge pull request #1 from ericlewis/release/1.0
chore: bump to 1.0
Variadic bootstrap function for SwiftLog.
Basically bridges LoggingSystem.bootstrap() arguments to a MultiplexLogHandler.
LoggingSystem.bootstrap()
MultiplexLogHandler
SwiftLogVariadicBootstrap is designed for Swift 5. To use the handler, you need to declare your dependency in your Package.swift:
SwiftLogVariadicBootstrap
Package.swift
.package(url: "https://github.com/ericlewis/swift-log-variadic-bootstrap.git", from: "1.0.0"),
and to your application/library target, add "VariadicBootstrap" to your dependencies, e.g. like this:
"VariadicBootstrap"
dependencies
.target(name: "BestExampleApp", dependencies: [ .product(name: "VariadicBootstrap", package: "swift-log-variadic-bootstrap") ],
It works exactly like the existing bootstrap function but it is variadic!
import Logging import VariadicBootstrap import ExampleLogBackend1 import ExampleLogBackend2 LoggingSystem.bootstrap(ExampleLogBackend1.init, ExampleLogBackend2.init)
import Logging import VariadicBootstrap import ExampleLogBackend1 import ExampleLogBackend2 let backend1 = ExampleLogBackend1(label: "FirstBackend") let backend2 = ExampleLogBackend2(label: "SecondBackend") LoggingSystem.bootstrap(backend1, backend2)
This library is released under the MIT license. See LICENSE for details.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
SwiftLogVariadicBootstrap
Variadic bootstrap function for SwiftLog.
Basically bridges
LoggingSystem.bootstrap()
arguments to aMultiplexLogHandler
.Getting Started
Adding the dependency
SwiftLogVariadicBootstrap
is designed for Swift 5. To use the handler, you need to declare your dependency in yourPackage.swift
:and to your application/library target, add
"VariadicBootstrap"
to yourdependencies
, e.g. like this:Example
It works exactly like the existing bootstrap function but it is variadic!
Allow the labels to be passed in via bootstrap
Set custom labels per backend
License
This library is released under the MIT license. See LICENSE for details.