---
title: "isEnabled(type:)"
framework: os
role: symbol
role_heading: Instance Method
path: "os/oslog/isenabled(type:)"
---

# isEnabled(type:)

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

## Declaration

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

## Parameters

- `type`: A log type constant, such as doc://com.apple.os/documentation/os/os_log_type_t/OS_LOG_TYPE_DEFAULT, doc://com.apple.os/documentation/os/os_log_type_t/OS_LOG_TYPE_INFO, doc://com.apple.os/documentation/os/os_log_type_t/OS_LOG_TYPE_DEBUG, doc://com.apple.os/documentation/os/os_log_type_t/OS_LOG_TYPE_ERROR, or doc://com.apple.os/documentation/os/os_log_type_t/OS_LOG_TYPE_FAULT, that specifies the level of logging to check.

## Return Value

Return Value true if logging at the specified level is in an enabled state; otherwise, false.
