Function

os_log_type_enabled

Returns a Boolean value indicating whether a specific type of logging, such as default, info, debug, error, or fault, is enabled for a specified log object.

Declaration

bool os_log_type_enabled(os_log_t oslog, os_log_type_t type);

Parameters

log

The OS_LOG_DEFAULT constant or a custom log object previously created by the os_log_create function.

type

A log type constant, such as OS_LOG_TYPE_DEFAULT, OS_LOG_TYPE_INFO, OS_LOG_TYPE_DEBUG, OS_LOG_TYPE_ERROR, or OS_LOG_TYPE_FAULT, indicating the level of logging to check.

Return Value

YES if logging at the specified level is enabled, otherwise NO.

See Also

Determining Whether Logging is Enabled

os_log_info_enabled

Returns a Boolean value indicating whether info-level logging is enabled for a specified log object.

os_log_debug_enabled

Returns a Boolean value indicating whether debug-level logging is enabled for a specified log object.