<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/OSLogType",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "c:@EA@os_log_type_t"
  },
  "title" : "OSLogType"
}
-->

# OSLogType

The various log levels that the unified logging system provides.

```
struct OSLogType
```

## 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`](/documentation/os/Logger) and call its [`log(level:_:)`](/documentation/os/Logger/log(level:_:)) method. Alternatively, call the method that corresponds to the desired log level, such as [`debug(_:)`](/documentation/os/Logger/debug(_:)) or [`fault(_:)`](/documentation/os/Logger/fault(_:)).

## Topics

### Getting Log Types

[`debug`](/documentation/os/OSLogType/debug)

The debug log level.

[`info`](/documentation/os/OSLogType/info)

The informative log level.

[`default`](/documentation/os/OSLogType/default)

The default log level.

[`error`](/documentation/os/OSLogType/error)

The error log level.

[`fault`](/documentation/os/OSLogType/fault)

The fault log level.

### Creating a Log Type

[`init(_:)`](/documentation/os/OSLogType/init(_:))

Creates a log type from the specified value.

[`init(rawValue:)`](/documentation/os/OSLogType/init(rawValue:))

Creates a log type from the specified raw value.

### Getting the Raw Value

[`rawValue`](/documentation/os/OSLogType/rawValue)

The log type’s raw value.



---

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)