LXEntryFormatter

public class LXEntryFormatter

Instances of LXEntryFormatter create string representations of LXLogEntry objects. There are several built-in formats available, or a custom format can be specified as a closure of the type (LXLogEntry) -> String.

  • Converts LXLogEntry objects into strings in a standard format that contains basic debugging information.

    Declaration

    Swift

    public class func standardFormatter() -> Self
  • Converts LXLogEntry objects into strings in a long format that contains detailed debugging information.

    Declaration

    Swift

    public class func longFormatter() -> Self
  • Converts LXLogEntry objects into strings in a short format that contains minimal debugging information.

    Declaration

    Swift

    public class func shortFormatter() -> Self
  • Converts LXLogEntry objects into strings in a short format that contains only the logged message.

    Declaration

    Swift

    public class func messageOnlyFormatter() -> Self
  • Creates a new LXEntryFormatter instance.

    • parameters:
      • _ A closure that accepts an LXLogEntry and returns a String.

    Declaration

    Swift

    public required init(_ closure: (LXLogEntry) -> String)

    Parameters

    _

    A closure that accepts an LXLogEntry and returns a String.