LogFileConfiguration

public class LogFileConfiguration

Log file configuration.

  • The directory to store the log files.

    Declaration

    Swift

    public let directory: String
  • To use plain text file format instead of the default binary format.

    Declaration

    Swift

    public var usePlainText: Bool { get set }
  • The maximum size of a log file before being rotated in bytes. The default is LogFileConfiguration.defaultMaxSize

    Declaration

    Swift

    public var maxSize: UInt64 { get set }
  • The Max number of rotated log files to keep. The default value is LogFileConfiguration.defaultMaxRotateCount

    Declaration

    Swift

    public var maxRotateCount: Int { get set }
  • Initializes with a directory to store the log files.

    Declaration

    Swift

    public init(directory: String)
  • [false] Plaintext is not used, and instead binary encoding is used in log files

    Declaration

    Swift

    static let defaultUsePlaintext: Bool
  • [false] Plaintext is not used, and instead binary encoding is used in log files @available(*, deprecated, message: “Use LogFileConfiguration.defaultUsePlaintext instead.”)

    Declaration

    Swift

    static let defaultUsePlainText: Bool
  • [524288] 512 KiB for the size of a log file

    Declaration

    Swift

    static let defaultMaxSize: UInt64
  • [1] 1 rotated file present (2 total, including the currently active log file)

    Declaration

    Swift

    static let defaultMaxRotateCount: Int