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

# OSLogStore

A set of entries from the unified logging system.

```
class OSLogStore
```

## Overview

Instances of this class represent a fixed range of entries and may be backed by a `logarchive` or your Mac’s local store.

In Swift, Use the [`getEntries(with:at:matching:)`](/documentation/OSLog/OSLogStore/getEntries(with:at:matching:)) function to retrieve a filtered array of log entries.

In Objective-C, use instances of this class to create [`OSLogEnumerator`](/documentation/OSLog/OSLogEnumerator) objects. One store can support multiple `OSLogEnumerator` instances concurrently.

## Topics

### Creating Log Stores

[`init(url:)`](/documentation/OSLog/OSLogStore/init(url:)-5v3w7)

Creates a log store based on a log archive.

[`local()`](/documentation/OSLog/OSLogStore/local())

Creates a log store representing the Mac’s local store.

### Accessing Position

[`position(date:)`](/documentation/OSLog/OSLogStore/position(date:))

Returns a position representing the time specified.

[`position(timeIntervalSinceEnd:)`](/documentation/OSLog/OSLogStore/position(timeIntervalSinceEnd:))

Returns a position representing time since the end of the time range that the entries span.

[`position(timeIntervalSinceLatestBoot:)`](/documentation/OSLog/OSLogStore/position(timeIntervalSinceLatestBoot:))

Returns a position representing time since the last boot in the series of entries.

### Accessing Entries

[`getEntries(with:at:matching:)`](/documentation/OSLog/OSLogStore/getEntries(with:at:matching:))

Returns a sequence of log entries filtered by the parameters passed in.

[`entriesEnumeratorAndReturnError:`](/documentation/OSLog/OSLogStore/entriesEnumeratorAndReturnError:)

Returns a log enumerator with default options for viewing the entries.

[`entriesEnumeratorWithOptions:position:predicate:error:`](/documentation/OSLog/OSLogStore/entriesEnumeratorWithOptions:position:predicate:error:)

Returns a log enumerator based on an underlying store.

### Initializers

[`init()`](/documentation/OSLog/OSLogStore/init())

[`init(scope:)`](/documentation/OSLog/OSLogStore/init(scope:))

### Enumerations

[`OSLogStore.Scope`](/documentation/OSLog/OSLogStore/Scope)



---

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)
