---
title: "appendInterpolation(_:format:align:privacy:attributes:)"
framework: os
role: symbol
role_heading: Instance Method
path: "os/osloginterpolation/appendinterpolation(_:format:align:privacy:attributes:)-8107a"
---

# appendInterpolation(_:format:align:privacy:attributes:)

Appends an interpolated numeric type using the specified attributes.

## Declaration

```swift
mutating func appendInterpolation<T>(_ number: @autoclosure @escaping () -> T, format: OSLogIntegerFormatting = .decimal, align: OSLogStringAlignment = .none, privacy: OSLogPrivacy = .auto, attributes: String) where T : FixedWidthInteger
```

## Parameters

- `number`: The interpolated numeric type, which the system automatically wraps in a closure. The type itself doesn’t appear in the log message. Instead, the system incorporates the type’s integer value.
- `format`: The format to apply to the value when the system renders it in a log message. For more information, see doc://com.apple.os/documentation/os/OSLogIntegerFormatting. The default value is doc://com.apple.os/documentation/os/OSLogIntegerFormatting/decimal.
- `align`: The alignment and minimum number of columns to use when the system renders the value in a log message. For more information, see doc://com.apple.os/documentation/os/OSLogStringAlignment. The default value is doc://com.apple.os/documentation/os/OSLogStringAlignment/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 doc://com.apple.os/documentation/os/OSLogPrivacy. The default value is doc://com.apple.os/documentation/os/OSLogPrivacy/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 https://help.apple.com/instruments/developer/mac/current/#/devcd5016d31.

## Discussion

Discussion important: You don’t call this method directly. Instead, the framework calls it automatically when you append an interpolated type that adopts the FixedWidthInteger protocol to a log message.

## See Also

### Appending Generic Types

- [appendInterpolation(_:align:privacy:)](os/osloginterpolation/appendinterpolation(_:align:privacy:)-84m60.md)
- [appendInterpolation(_:align:privacy:attributes:)](os/osloginterpolation/appendinterpolation(_:align:privacy:attributes:)-xyum.md)
- [appendInterpolation(_:align:privacy:)](os/osloginterpolation/appendinterpolation(_:align:privacy:)-8hwmt.md)
- [appendInterpolation(_:align:privacy:attributes:)](os/osloginterpolation/appendinterpolation(_:align:privacy:attributes:)-9hehv.md)
