BufferStrategy

public enum BufferStrategy

A BufferStrategy is the action the internal buffer will take when a new log entry is logged but the buffer is at it’s limit (maxSize).

See also

ConcurrencyMode.async(options:) for for more information about usage.

Available Strategies

  • If dropTail is used, when the buffer is filled to its maximum capacity, the newly arriving log entries are dropped until the buffer has enough room to accept incoming entries.

    Declaration

    Swift

    case dropTail(at: Int)

    Parameters

    at

    start dropping log entries when this number of entries is reached in the buffer.

  • If dropHead is used, when the buffer is filled to its maximum capacity, the oldest entry (head) is dropped to make room for the newly arriving log entry.

    Declaration

    Swift

    case dropHead(at: Int)

    Parameters

    at

    start dropping log entries when this number of entries is reached in the buffer.

  • If expand is set, the buffer will continue to expand until the available memory is exhausted.

    Declaration

    Swift

    case expand