Files
swift-log/Sources/ExampleUsage/MultiplexExample.swift
T

19 lines
509 B
Swift

//
// THIS IS NOT PART OF THE PITCH, JUST AN EXAMPLE HOW A LOGGER USAGE LOOKS LIKE
//
import ExampleImplementation
import Foundation
import Logging
enum MultiplexExample {
static func main() {
// boostrap with two of our sample implementations
let logging = MultiplexLogging([SimpleLogging().make, FileLogging().make])
Logging.bootstrap(logging.make)
// run the example
let logger = Logging.make("com.example.TestApp")
logger.info("hello world!")
}
}