---
title: OSLogIntegerFormatting
framework: os
role: symbol
role_heading: Structure
path: os/oslogintegerformatting
---

# OSLogIntegerFormatting

The formatting options for integer values.

## Declaration

```swift
@frozen struct OSLogIntegerFormatting
```

## Mentioned in

Generating Log Messages from Your Code

## Overview

Overview An OSLogIntegerFormatting structure encapsulates the formatting details for integer numbers. Use the static decimal, hex, and octal structures to apply default formatting to integer values. You can also create new OSLogIntegerFormatting structures that customize the rules for handling a leading plus sign, special numerical prefixes, the minimum number of digits, and more.

## Topics

### Getting the Standard Formats

- [decimal](os/oslogintegerformatting/decimal.md)
- [hex](os/oslogintegerformatting/hex.md)
- [octal](os/oslogintegerformatting/octal.md)

### Creating a Custom Integer Format

- [decimal(explicitPositiveSign:)](os/oslogintegerformatting/decimal(explicitpositivesign:).md)
- [decimal(explicitPositiveSign:minDigits:)](os/oslogintegerformatting/decimal(explicitpositivesign:mindigits:).md)
- [hex(explicitPositiveSign:includePrefix:uppercase:)](os/oslogintegerformatting/hex(explicitpositivesign:includeprefix:uppercase:).md)
- [hex(explicitPositiveSign:includePrefix:uppercase:minDigits:)](os/oslogintegerformatting/hex(explicitpositivesign:includeprefix:uppercase:mindigits:).md)
- [octal(explicitPositiveSign:includePrefix:uppercase:)](os/oslogintegerformatting/octal(explicitpositivesign:includeprefix:uppercase:).md)
- [octal(explicitPositiveSign:includePrefix:uppercase:minDigits:)](os/oslogintegerformatting/octal(explicitpositivesign:includeprefix:uppercase:mindigits:).md)

## See Also

### Value Formatters

- [OSLogBoolFormat](os/oslogboolformat.md)
- [OSLogInt32ExtendedFormat](os/oslogint32extendedformat.md)
- [OSLogFloatFormatting](os/oslogfloatformatting.md)
- [OSLogPointerFormat](os/oslogpointerformat.md)
