---
title: "os_log(_:)"
framework: os
role: symbol
role_heading: Function
path: "os/os_log(_:)"
---

# os_log(_:)

Adds a new log message to the default subsystem.

## Declaration

```swift
func os_log(_ message: OSLogMessage)
```

## Parameters

- `message`: A string containing the message you want to log. Always specify this parameter as a string; this function converts it to an doc://com.apple.os/documentation/os/OSLogMessage object. You may include interpolated values in the string.

## See Also

### Log Messages

- [os_log(_:log:_:)](os/os_log(_:log:_:).md)
- [os_log(_:dso:log:_:_:)](os/os_log(_:dso:log:_:_:).md)
- [os_log(_:dso:log:type:_:)](os/os_log(_:dso:log:type:_:).md)
