StandardOutputLogRecorder
open class StandardOutputLogRecorder: LogRecorderBase
The StandardOutputLogRecorder logs messages by writing to the standard output
stream of the running process.
-
Initializes a
StandardOutputLogRecorderinstance to use theXcodeLogFormatterimplementation for formatting log messages.Declaration
Swift
public init() -
Initializes a
StandardOutputLogRecorderinstance to use the specifiedLogFormatterimplementation for formatting log messages.Declaration
Swift
public init(formatter: LogFormatter)Parameters
formatterThe
LogFormatterto use for formatting log messages recorded by the receiver. -
Initializes a
StandardOutputLogRecorderinstance to use the specifiedLogFormatterimplementation for formatting log messages.Declaration
Swift
public override init(formatters: [LogFormatter])Parameters
formattersThe
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
formattersassociated with the receiver returned a non-nilstring for the givenLogEntry.Declaration
Swift
open override func record(message: String, for entry: LogEntry, currentQueue: DispatchQueue, synchronousMode: Bool)Parameters
messageThe message to record.
entryThe
LogEntryfor whichmessagewas created.currentQueueThe GCD queue on which the function is being executed.
synchronousModeIf
true, the receiver should record the log entry synchronously and flush any buffers before returning.
View on GitHub
StandardOutputLogRecorder Class Reference