---
title: "init(_:)"
framework: os
role: symbol
role_heading: Initializer
path: "os/logger/init(_:)"
---

# init(_:)

Creates a logger that writes to the specified log.

## Declaration

```swift
init(_ logObj: OSLog)
```

## Parameters

- `logObj`: The log to write messages to.

## See Also

### Creating a Logger

- [init()](os/logger/init().md)
- [init(subsystem:category:)](os/logger/init(subsystem:category:).md)
- [OSLog](os/oslog.md)
