<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/OSLogInterpolation/appendInterpolation(_:format:align:privacy:attributes:)-8107a",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "s:2os18OSLogInterpolationV06appendC0_6format5align7privacy10attributesyxyXA_AA0B17IntegerFormattingVAA0B15StringAlignmentVAA0B7PrivacyVSSts010FixedWidthI0RzlF"
  },
  "title" : "appendInterpolation(_:format:align:privacy:attributes:)"
}
-->

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

Appends an interpolated numeric type using the specified attributes.

```
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 [`OSLogIntegerFormatting`](/documentation/os/OSLogIntegerFormatting). The default value is [`decimal`](/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 [`OSLogStringAlignment`](/documentation/os/OSLogStringAlignment). The default value is [`none`](/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 [`OSLogPrivacy`](/documentation/os/OSLogPrivacy). The default value is [`auto`](/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 [Instruments Developer Help](https://help.apple.com/instruments/developer/mac/current/#/devcd5016d31).

## Discussion

> Important:
> You don’t call this method directly. Instead, the framework calls it automatically when you append an interpolated type that adopts the <doc://com.apple.documentation/documentation/Swift/FixedWidthInteger> protocol to a log message.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)