Class

OSLogStore

A set of entries from the unified logging system.

Declaration

class OSLogStore : NSObject

Overview

Instances of this class represent a fixed range of entries and may be backed by a logarchive or your Mac's local store. Use the getEntries(with:at:matching:) function to retrieve a filtered array of log entries.

Topics

Creating Log Stores

init(url: URL)

Creates a log store based on a log archive.

class func local() -> Self

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

Accessing Position

func position(date: Date) -> OSLogPosition

Returns a position representing the time specified.

func position(timeIntervalSinceEnd: TimeInterval) -> OSLogPosition

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

func position(timeIntervalSinceLatestBoot: TimeInterval) -> OSLogPosition

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

Accessing Entries

Relationships

Inherits From

Conforms To

See Also

Read Log Entries

class OSLogEnumerator

An enumerator that can access and list log entries.