Logger
A Logger
is the central type in SwiftLog
. Its central function is to emit log messages using one of the methods corresponding to a log level.
struct Logger
Logger
s are value types with respect to the Level
and the Metadata
(as well as the immutable label
and the selected LogHandler
). Therefore, Logger
s are suitable to be passed around between libraries if you want to preserve metadata across libraries.
The most basic usage of a Logger
is
logger.info("Hello World!")