LogrService

public class LogrService

Main logging service used for dispatching messages to dedicated targets for further processing.

  • Initializes new intance of LogrService with provided configuration. Overrides previously set targets and dispatchQueue properties.

    Declaration

    Swift

    @discardableResult
    public init(with config: Config, dispatchQueue: DispatchQueue? = nil)

    Parameters

    config

    struct encapsulating configuration properties used by LogrService.

    dispatchQueue

    queue to be used for handling incoming log messages and forwarding to previously set targets.

  • Dispatches log messages to the targets based on configuration: synchronously or asynchronously.

    Declaration

    Swift

    public func log(_ message: Message)

    Parameters

    message

    struct encapsulating all log message data including meta information