---
title: "os_trace_type_enabled(_:)"
framework: os
role: symbol
role_heading: Function
platforms: [iOS 8.0+, iPadOS 8.0+, Mac Catalyst 13.1+, macOS 10.10+, tvOS 8.0+, visionOS 1.0+, watchOS 2.0+]
path: "os/os_trace_type_enabled(_:)"
---

# os_trace_type_enabled(_:)

Returns whether the specified info level trace information is enabled.

## Declaration

```swift
func os_trace_type_enabled(_ type: UInt8) -> Bool
```

## Parameters

- `type`: The type of trace to check. Possible values are doc://com.apple.os/documentation/os/OS_TRACE_TYPE_DEBUG and doc://com.apple.os/documentation/os/OS_TRACE_TYPE_INFO.

## Discussion

Discussion Generally, trace points should not involve expensive operations, however some circumstances warrant it. Use this function to do expensive work only when a given level of trace messages are enabled.

## See Also

### Deprecated Functions

- [os_trace_debug_enabled()](os/os_trace_debug_enabled().md)
- [os_trace_info_enabled()](os/os_trace_info_enabled().md)
