StandardOutputLogRecorder

open class StandardOutputLogRecorder: LogRecorderBase

The StandardOutputLogRecorder logs messages by writing to the standard output stream of the running process.

  • Initializes a StandardOutputLogRecorder instance to use the XcodeLogFormatter implementation for formatting log messages.

    Declaration

    Swift

    public init()
  • Initializes a StandardOutputLogRecorder instance to use the specified LogFormatter implementation for formatting log messages.

    Declaration

    Swift

    public init(formatter: LogFormatter)

    Parameters

    formatter

    The LogFormatter to use for formatting log messages recorded by the receiver.

  • Initializes a StandardOutputLogRecorder instance to use the specified LogFormatter implementation for formatting log messages.

    Declaration

    Swift

    public override init(formatters: [LogFormatter])

    Parameters

    formatters

    The LogFormatters to use for formatting log messages recorded by the receiver.

  • Called to record the specified message to standard output.

    Note

    This function is only called if one of the formatters associated with the receiver returned a non-nil string for the given LogEntry.

    Declaration

    Swift

    open override func record(message: String, for entry: LogEntry, currentQueue: DispatchQueue, synchronousMode: Bool)

    Parameters

    message

    The message to record.

    entry

    The LogEntry for which message was created.

    currentQueue

    The GCD queue on which the function is being executed.

    synchronousMode

    If true, the receiver should record the log entry synchronously and flush any buffers before returning.