---
title: OSLogInt32ExtendedFormat.byteCount
framework: os
role: symbol
role_heading: Case
path: os/oslogint32extendedformat/bytecount
---

# OSLogInt32ExtendedFormat.byteCount

A format that displays a 32-bit integer as bytes.

## Declaration

```swift
case byteCount
```

## Discussion

Discussion Use this option to format the interpolated value as bytes, such as 100 kB. The following example applies the byteCount formatter to the 32-bit integer value 100_000: // Create a logger with the specified subsystem and category. let logger = Logger(subsystem: "com.example.OSLogValueFormatting",                     category: "Formatter Output")                  // Assign the value to interpolate. let value: Int32 = 100_000                  // Write the value to the log using the specified format. logger.info(".byteCount output is \(value, format: .byteCount)") And the system writes the folllowing message to the log: [Formatter Output] .byteCount output is 100 kB

## See Also

### Getting the Formats

- [OSLogInt32ExtendedFormat.ipv4Address](os/oslogint32extendedformat/ipv4address.md)
- [OSLogInt32ExtendedFormat.secondsSince1970](os/oslogint32extendedformat/secondssince1970.md)
- [OSLogInt32ExtendedFormat.darwinErrno](os/oslogint32extendedformat/darwinerrno.md)
- [OSLogInt32ExtendedFormat.darwinMode](os/oslogint32extendedformat/darwinmode.md)
- [OSLogInt32ExtendedFormat.darwinSignal](os/oslogint32extendedformat/darwinsignal.md)
- [OSLogInt32ExtendedFormat.bitrate](os/oslogint32extendedformat/bitrate.md)
- [OSLogInt32ExtendedFormat.bitrateIEC](os/oslogint32extendedformat/bitrateiec.md)
- [OSLogInt32ExtendedFormat.byteCountIEC](os/oslogint32extendedformat/bytecountiec.md)
- [OSLogInt32ExtendedFormat.truth](os/oslogint32extendedformat/truth.md)
- [OSLogInt32ExtendedFormat.answer](os/oslogint32extendedformat/answer.md)
