Multiple proposal improvements to the API (#41)

* Move `Logging.make` to a `Logger` initializer.
* Remove all factory initializers in example and test code.
This commit is contained in:
David Hart authored and Johannes Weiss committed 2019-02-18 20:27:59 +01:00
1 parent 03174f3260
commit 2474d61a80
19 files changed
+336 -376

No files matched your search

+2 -3
View File
@@ -9,10 +9,9 @@ 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)
Logging.bootstrap({ MultiplexLogHandler([SimpleLogHandler(label: $0), FileLogHandler(label: $0)]) })
// run the example
let logger = Logging.make("com.example.TestApp")
let logger = Logger(label: "com.example.TestApp")
logger.info("hello world!")
}
}