Contents

appendInterpolation(_:align:privacy:attributes:)

Appends an interpolated textual representation of a type using the specified attributes.

Declaration

mutating func appendInterpolation<T>(_ value: @autoclosure  @escaping () -> T, align: OSLogStringAlignment = .none, privacy: OSLogPrivacy = .auto, attributes: String) where T : CustomStringConvertible

Parameters

  • value:

    The interpolated type, which the system automatically wraps in a closure. The type itself doesn’t appear in the log message. Instead, the system incorporates the textual representation the type provides through its implementation of the Customstringconvertible protocol.

  • align:

    The alignment and minimum number of columns to use when the system renders the value in a log message. For more information, see Oslogstringalignment. The default value is None.

  • privacy:

    The privacy level of the value, which the system applies when it renders the value in a log message. For more information, see Oslogprivacy. The default value is Auto.

  • attributes:

    Additional information about the value. Tools that process log messages interpret these attributes, which you typically provide as key-value pairs. For example, Instruments processes any e_ngineering types_ you embed in this value. For more information, see Devcd5016d31.

Discussion

See Also

Appending Generic Types