---
title: OSLogType
framework: os
role: symbol
role_heading: Structure
path: os/oslogtype
---

# OSLogType

The various log levels that the unified logging system provides.

## Declaration

```swift
struct OSLogType
```

## Overview

Overview A log level controls how and when the system writes a message to the unified logging system. To write a message with a specific log level, create a Logger and call its log(level:_:) method. Alternatively, call the method that corresponds to the desired log level, such as debug(_:) or fault(_:).

## Topics

### Getting Log Types

- [debug](os/oslogtype/debug.md)
- [info](os/oslogtype/info.md)
- [default](os/oslogtype/default.md)
- [error](os/oslogtype/error.md)
- [fault](os/oslogtype/fault.md)

### Creating a Log Type

- [init(_:)](os/oslogtype/init(_:).md)
- [init(rawValue:)](os/oslogtype/init(rawvalue:).md)

### Getting the Raw Value

- [rawValue](os/oslogtype/rawvalue.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)

## See Also

### Log Messages

- [Logger](os/logger.md)
- [Message Argument Formatters](os/message-argument-formatters.md)
