mirror of
https://github.com/apple/swift-log
synced 2026-11-27 04:14:20 +00:00
1 parent
91f6b1017c
commit
ed51baef90
4 files changed
+5
-5
No files matched your search
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// 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!")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user