LoggingSystem

public enum LoggingSystem

The LoggingSystem is a global facility where the default logging backend implementation (LogHandler) can be configured. LoggingSystem is set up just once in a given program to set up the desired logging backend implementation.

  • bootstrap is a one-time configuration function which globally selects the desired logging backend implementation. bootstrap can be called at maximum once in any given program, calling it more than once will lead to undefined behavior, most likely a crash.

    Declaration

    Swift

    public static func bootstrap(_ factory: @escaping (String) -> LogHandler)

    Parameters

    factory

    A closure that given a Logger identifier, produces an instance of the LogHandler.