<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/OSSignpostID/init(log:object:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "s:2os12OSSignpostIDV3log6objectACSo03OS_a1_D0C_yXltcfc"
  },
  "title" : "init(log:object:)"
}
-->

# init(log:object:)

Creates a signpost ID and associates it with the specified object.

```
init(log: OSLog, object: AnyObject)
```

## Parameters

`log`

The log that you’re writing signposted events to.

`object`

The object to associate with this signpost ID.

## Discussion

> Important:
> Don’t use this method if your signpost IDs cross process boundaries.

---

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)