<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/OSLog",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "c:objc(cs)OS_os_log"
  },
  "title" : "OSLog"
}
-->

# OSLog

A container of related log messages.

```
class OSLog
```

## 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:)`](/documentation/os/OSLog/init(subsystem:category:)-17gyy)

Creates a log using the specified subsystem and category.

[`init(subsystem:category:)`](/documentation/os/OSLog/init(subsystem:category:)-72ghw)

Creates a log using the specified subsystem and system-defined category.

[`OSLog.Category`](/documentation/os/OSLog/Category)

System-defined categories that identify well-known parts of your app.

### Getting the Shared Logs

[`default`](/documentation/os/OSLog/default)

The shared default log.

[`disabled`](/documentation/os/OSLog/disabled)

The shared disabled log.

### Getting Log Configuration

[`isEnabled(type:)`](/documentation/os/OSLog/isEnabled(type:))

Returns a Boolean value that indicates whether the log can write messages with the specified log type.

[`signpostsEnabled`](/documentation/os/OSLog/signpostsEnabled)

A Boolean value that indicates whether a log is able to use signpost logging.



---

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)