LogConfiguration

public protocol LogConfiguration

Defines an interface for specifying the configuration of the logging system.

  • The minimum LogSeverity supported by the configuration.

    Declaration

    Swift

    var minimumSeverity: LogSeverity
  • The LogFilters to use when deciding whether a given LogEntry should be passed along to the receiver’s recorders. If any filter returns false from shouldRecordLogEntry(_:), the LogEntry will be silently ignored when being processed for this LogConfiguration.

    Declaration

    Swift

    var filters: [LogFilter]
  • The LogRecorders to use for recording any LogEntry that has passed the filtering process.

    Declaration

    Swift

    var recorders: [LogRecorder]
  • A flag indicating whether synchronous mode will be used when passing LogEntry instances to the receiver’s recorders. Synchronous mode is helpful while debugging, as it ensures that logs are always up-to-date when debug breakpoints are hit. However, synchronous mode can have a negative influence on performance and is therefore not recommended for use in production code.

    Declaration

    Swift

    var synchronousMode: Bool
  • configurations Default implementation

    For organizational purposes, a given LogConfiguration may in turn contain one or more additional LogConfigurations. Each contained LogConfiguration is an entirely separate entity; children do not inherit any state from parent containers.

    Default Implementation

    A default implementation returning nil, indicating that the receiver contains no LogConfigurations.

    Declaration

    Swift

    var configurations: [LogConfiguration]?