LogHandler

public protocol LogHandler

An endpoint for log records.

If a Logger determines a LogRecord should be logged, that log record is dispatched to the logger’s current log handler.

A log handler might print the log record on the console, write it to a log file, forward it to an external logging system, or otherwise process the log record.

  • Called by a Logger to request this log handler process the specified log record.

    Implementations of this method must be threadsafe.

    Declaration

    Swift

    func log(_ record: LogRecord)

    Parameters

    record

    the log record