<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/os_log(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "s:2os0A4_logyyAA12OSLogMessageVF"
  },
  "title" : "os_log(_:)"
}
-->

# os_log(_:)

Adds a new log message to the default subsystem.

```
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 [`OSLogMessage`](/documentation/os/OSLogMessage) object. You may include interpolated values in the string.

---

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)