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

# init(subsystem:category:)

Creates a logger using the specified subsystem and category.

## Declaration

```swift
init(subsystem: String, category: String)
```

## Parameters

- `subsystem`: The string that identifies the subsystem that emits signposts. Typically, you use the same value as your app’s bundle ID. For more information, see doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/CFBundleIdentifier.
- `category`: The string that the system uses to categorize emitted signposts.

## See Also

### Creating a Logger

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