Documentation
¶
Overview ¶
Command logread emits log entries at several levels and reads them back from the unified logging store.
It writes one message per os_log level under a subsystem, then opens an OSLogStore scoped to the current process and enumerates the entries recorded in the recent past, printing the ones that match the subsystem.
Reading the current process's own entries needs no entitlement; the system-wide store (OSLogStoreSystem) does.
The composed message often reads "<compose failure [UUID]>": os_log stores only the format string's address, and the logging system cannot recover it from a binary it has no UUID record for. The entry metadata — date, level, subsystem, category, process — is still accurate.
Usage:
go run ./examples/oslog/logread [-subsystem name] [-since duration]