Structures

The following structures are available globally.

  • 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.

    The most basic usage of a Logger is

    logger.info("Hello World!")
    
    See more

    Declaration

    Swift

    public struct Logger
  • A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

    The first LogHandler passed to the initialisation function of MultiplexLogHandler control the logLevel as well as the metadata for this LogHandler. Any subsequent LogHandlers used to initialise a MultiplexLogHandler are merely to emit the log message to another place.

    See more

    Declaration

    Swift

    public struct MultiplexLogHandler : LogHandler
  • StreamLogHandler is a simple implementation of LogHandler for directing Logger output to either stderr or stdout via the factory methods.

    See more

    Declaration

    Swift

    public struct StreamLogHandler : LogHandler