open class LogRecorderBase: LogRecorder
A partial implementation of the
The GCD queue that should be used for logging actions related to the receiver.
open let queue: DispatchQueue
Initialize a new
public init(formatters: [LogFormatter], queue: DispatchQueue? = nil)
An array of
LogFormatters to use for formatting log entries to be recorded by the receiver. Each formatter is consulted in sequence, and the formatted string returned by the first formatter to yield a non-
nilvalue will be recorded. If every formatter returns
nil, the log entry is silently ignored and not recorded.
DispatchQueueto use for the recorder. If
nil, a new queue will be created.
This implementation, which does nothing, is present to satisfy the
LogRecorderprotocol. Subclasses must override this function to provide actual log recording functionality.
open func record(message: String, for entry: LogEntry, currentQueue: DispatchQueue, synchronousMode: Bool)
The message to record.
The GCD queue on which the function is being executed.
true, the recording is being done in synchronous mode, and the recorder should act accordingly.