<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/OSLog/isEnabled(type:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "c:@F@os_log_type_enabled"
  },
  "title" : "isEnabled(type:)"
}
-->

# isEnabled(type:)

Returns a Boolean value that indicates whether the log can write messages with the specified log type.

```
func isEnabled(type: OSLogType) -> Bool
```

## Parameters

`type`

A log type constant, such as [`OS_LOG_TYPE_DEFAULT`](/documentation/os/os_log_type_t/OS_LOG_TYPE_DEFAULT), [`OS_LOG_TYPE_INFO`](/documentation/os/os_log_type_t/OS_LOG_TYPE_INFO), [`OS_LOG_TYPE_DEBUG`](/documentation/os/os_log_type_t/OS_LOG_TYPE_DEBUG), [`OS_LOG_TYPE_ERROR`](/documentation/os/os_log_type_t/OS_LOG_TYPE_ERROR), or [`OS_LOG_TYPE_FAULT`](/documentation/os/os_log_type_t/OS_LOG_TYPE_FAULT), that specifies the level of logging to check.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if logging at the specified level is in an enabled state; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

---

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)