---
title: OSLog
framework: os
role: symbol
role_heading: Class
path: os/oslog
---

# OSLog

A container of related log messages.

## Declaration

```swift
class OSLog
```

## Mentioned in

Generating Log Messages from Your Code

## Overview

Overview A log categorizes the messages you write and makes it easy to sort and filter them. Each log contains a subsystem and a category, which you define. A subsystem identifies a major functional area of your app, which you specify using reverse DNS notation, such as com.your_company.your_subsystem_name. A category segregates specific areas within a subsystem.

## Topics

### Creating a Log

- [init(subsystem:category:)](os/oslog/init(subsystem:category:)-17gyy.md)
- [init(subsystem:category:)](os/oslog/init(subsystem:category:)-72ghw.md)
- [OSLog.Category](os/oslog/category.md)

### Getting the Shared Logs

- [default](os/oslog/default.md)
- [disabled](os/oslog/disabled.md)

### Getting Log Configuration

- [isEnabled(type:)](os/oslog/isenabled(type:).md)
- [signpostsEnabled](os/oslog/signpostsenabled.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Creating a Logger

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