SeverityStyle

public enum SeverityStyle

Specifies the manner in which LogSeverity values should be rendered by the SeverityLogFormatter.

  • Indicates that the LogSeverity will be output as a human-readable string with initial capitalization. No padding, truncation or alignment will occur.

    Declaration

    Swift

    case simple
  • Indicates that the LogSeverity will be output using defaults suitable for viewing within Xcode. The current implementation uses a TextRepresentation of .colorCoded, making it easier to spot important messages in the Xcode console.

    Declaration

    Swift

    case xcode
  • Indicates that the LogSeverity will be output as an integer contained in a string. No padding, truncation or alignment will occur.

    Declaration

    Swift

    case numeric
  • Allows customization of the SeverityStyle. The LogSeverity value will be converted to text as specified by the TextRepresentation value. If a value is provided for truncateAtWidth, fields longer than that will be truncated. Finally, if padToWidth is supplied, the field will be padded with spaces as appropriate. The value of rightAlign determines how padding occurs.

    Declaration

    Swift

    case custom(textRepresentation: TextRepresentation, truncateAtWidth: Int?, padToWidth: Int?, rightAlign: Bool)