---
title: OSLogInt32ExtendedFormat.darwinMode
framework: os
role: symbol
role_heading: Case
path: os/oslogint32extendedformat/darwinmode
---

# OSLogInt32ExtendedFormat.darwinMode

A format that displays a 32-bit integer as a Darwin file mode.

## Declaration

```swift
case darwinMode
```

## Discussion

Discussion Use this option to format the interpolated value as a Darwin file mode, such as -rwx------. Because Darwin uses octal values to represent file modes numerically, pass an octal literal to the formatter. Alternatively, convert the octal value to its 32-bit integer equivalent and interpolate that instead. For more information about using octal literals, see Numeric Literals. The following example formats the octal literal 0o700 using the darwinMode formatter: // Create a logger with the specified subsystem and category. let logger = Logger(subsystem: "com.example.OSLogValueFormatting",                     category: "Formatter Output")          // Darwin uses octal values to represent file modes. Use Swift's // support for octal literals to assign a file mode to a 32-bit  // integer variable. let value: Int32 = 0o700          // Write the value to the log using the specified format. logger.info(".darwinMode output is \(value, format: .darwinMode)") And the system writes the following message to the log: [Formatter Output] .darwinMode formats the value as -rwx------

## See Also

### Getting the Formats

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