Essentials
Logging
To aid with logging, Alchemy provides a lightweight wrapper on top of SwiftLog.
You can conveniently log to the various levels via static functions on the Log
struct.
These log to Log.logger
, an instance of SwiftLog.Logger
, which defaults to a basic stdout logger.
Configuring Custom Loggers
Log.logger
is a settable variable so you may set it to be a more complex Logger
that outputs to wherever you need it to go. See SwiftLog for advanced usage and available log drivers.