---
title: "init(log:object:)"
framework: os
role: symbol
role_heading: Initializer
path: "os/ossignpostid/init(log:object:)"
---

# init(log:object:)

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

## Declaration

```swift
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

Discussion important: Don’t use this method if your signpost IDs cross process boundaries.

## See Also

### Creating a Signpost Identifier

- [init(_:)](os/ossignpostid/init(_:).md)
- [init(log:)](os/ossignpostid/init(log:).md)
