Files
swift-log/Sources/ExampleUsage/main.swift
T
tomer doron c7583429a6 enforce that logging system can only be bootstrapped once (#32)
motivation: safer logging system

changes: do a precondition check to verify logging syste is only initialized/bootstrapped once per process
2019-02-22 18:13:52 +00:00

26 lines
578 B
Swift

import Logging
import ExampleImplementation
// boostrap with our sample implementation
LoggingSystem.bootstrap(SimpleLogHandler.init)
print()
print("##### global logger based system #####")
GlobalLoggerBasedSystem.main()
print()
print("##### local logger based system #####")
LocalLoggerBasedSystem.main()
print()
print("##### context based system #####")
ContextBasedSystem.main()
print()
print("##### multiplexiing to multiple logging implementations #####")
MultiplexExample.main()
print()
print("##### config based logging implementations #####")
ConfigExample.main()