<!--
{
  "documentType" : "article",
  "framework" : "os",
  "identifier" : "/documentation/os/os-log-t",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "os_log_t"
}
-->

# os_log_t

A log object that you pass to logging functions to send messages to that log.

## Topics

### Getting the Standard Log Objects

[`#define OS_LOG_DEFAULT`](/documentation/os/OS_LOG_DEFAULT)

The shared default log.

[`#define OS_LOG_DISABLED`](/documentation/os/OS_LOG_DISABLED)

The shared disabled log.

### Creating a Log Object

[`extern os_log_tos_log_create(const char *subsystem, const char *category);`](/documentation/os/os_log_create)

Creates a custom log object.

### Getting Log Configuration

[`#define os_log_info_enabled(log)`](/documentation/os/os_log_info_enabled)

Returns a Boolean value that indicates whether info-level logging is in an enabled state for a specified log object.

[`#define os_log_debug_enabled(log)`](/documentation/os/os_log_debug_enabled)

Returns a Boolean value that indicates whether debug-level logging is in an enabled state for a specified log object.

[`func isEnabled(type: OSLogType) -> Bool`](/documentation/os/OSLog/isEnabled(type:))

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

[`extern bool os_signpost_enabled(os_log_t log);`](/documentation/os/os_signpost_enabled)

Returns a Boolean value that indicates whether signposts are in an enabled state for the specified log.

### Data Types

[`typedef NSObject<OS_os_log> * os_log_t;`](/documentation/os/os_log_t)

A log object that you pass to logging functions to send messages to that log.



---

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)