---
title: os_log
framework: os
role: symbol
role_heading: Macro
path: os/os_log
---

# os_log

Sends a default-level message to the logging system.

## Declaration

```occ
#define os_log(log, format, ...)
```

## Parameters

- `log`: The doc://com.apple.os/documentation/os/OS_LOG_DEFAULT constant or a custom log object previously created by the doc://com.apple.os/documentation/os/os_log_create function.
- `format`: A constant string or format string that produces a human-readable log message. See https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFStrings/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265.

## Mentioned in

Generating Log Messages from Your Code

## Discussion

Discussion Calling this function is equivalent to calling the os_log_with_type function and specifying a log type of OS_LOG_TYPE_DEFAULT.

## See Also

### Log Messages

- [Message Argument Formatters](os/message-argument-formatters.md)
- [Legacy Logging Symbols](os/legacy-logging-symbols.md)
- [os_log_t](os/os-log-t.md)
- [os_log_with_type](os/os_log_with_type.md)
- [OSLogType](os/oslogtype.md)
- [os_log_info](os/os_log_info.md)
- [os_log_debug](os/os_log_debug.md)
- [os_log_error](os/os_log_error.md)
- [os_log_fault](os/os_log_fault.md)
