Help us shape the future of Go! Take the 2026 Go Developer Survey

oslog

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package oslog provides a fluent Go API over the macOS OSLog framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type LogEntry added in v0.17.0

type LogEntry struct {
	objref.Handle
}

LogEntry is an idiomatic wrapper over the Objective-C class OSLogEntry.

LogEntry is an abstract base — you do not construct it directly. Construct one of LogEntryActivity, LogEntryBoundary, LogEntryLog, LogEntrySignpost and pass it where a LogEntry is accepted.

A single entry from the unified logging system.

func LogEntryFromID added in v0.17.0

func LogEntryFromID(id objc.ID) *LogEntry

LogEntryFromID adopts an existing Objective-C object as a LogEntry (nil for 0), retaining it and registering a release finalizer.

func (*LogEntry) ComposedMessage added in v0.17.0

func (le *LogEntry) ComposedMessage() string

ComposedMessage returns the fully formatted message for the entry.

func (*LogEntry) Date added in v0.17.0

func (le *LogEntry) Date() time.Time

Date returns the timestamp of the entry.

func (*LogEntry) Description added in v0.17.0

func (le *LogEntry) Description() string

Description returns the object's -description text.

func (*LogEntry) IsEqual added in v0.17.0

func (le *LogEntry) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*LogEntry) IsKind added in v0.17.0

func (le *LogEntry) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*LogEntry) StoreCategory added in v0.17.0

func (le *LogEntry) StoreCategory() LogEntryStoreCategory

StoreCategory returns this entry's storage tag. See OSLogEntryStoreCategory.

func (*LogEntry) String added in v0.17.0

func (le *LogEntry) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type LogEntryActivity added in v0.17.0

type LogEntryActivity struct {
	LogEntry
}

LogEntryActivity is an idiomatic wrapper over the Objective-C class OSLogEntryActivity.

It embeds LogEntry, promoting that type's methods.

An entry generated by an activity event.

func LogEntryActivityFromID added in v0.17.0

func LogEntryActivityFromID(id objc.ID) *LogEntryActivity

LogEntryActivityFromID adopts an existing Objective-C object as a LogEntryActivity (nil for 0), retaining it and registering a release finalizer.

func NewLogEntryActivity added in v0.17.0

func NewLogEntryActivity() *LogEntryActivity

NewLogEntryActivity creates a new LogEntryActivity.

func (*LogEntryActivity) ParentActivityIdentifier added in v0.17.0

func (lea *LogEntryActivity) ParentActivityIdentifier() uint64

ParentActivityIdentifier returns this parent activity's activity ID.

type LogEntryBoundary added in v0.17.0

type LogEntryBoundary struct {
	LogEntry
}

LogEntryBoundary is an idiomatic wrapper over the Objective-C class OSLogEntryBoundary.

It embeds LogEntry, promoting that type's methods.

The metadata that partitions sequences of other entries.

func LogEntryBoundaryFromID added in v0.17.0

func LogEntryBoundaryFromID(id objc.ID) *LogEntryBoundary

LogEntryBoundaryFromID adopts an existing Objective-C object as a LogEntryBoundary (nil for 0), retaining it and registering a release finalizer.

func NewLogEntryBoundary added in v0.17.0

func NewLogEntryBoundary() *LogEntryBoundary

NewLogEntryBoundary creates a new LogEntryBoundary.

type LogEntryFromProcess added in v0.17.0

type LogEntryFromProcess interface {
	ActivityIdentifier() uint64
	Process() string
	ProcessIdentifier() int
	Sender() string
	ThreadIdentifier() uint64
}

LogEntryFromProcess is the Go form of the Objective-C protocol OSLogEntryFromProcess.

type LogEntryLog added in v0.17.0

type LogEntryLog struct {
	LogEntry
}

LogEntryLog is an idiomatic wrapper over the Objective-C class OSLogEntryLog.

It embeds LogEntry, promoting that type's methods.

A log entry.

func LogEntryLogFromID added in v0.17.0

func LogEntryLogFromID(id objc.ID) *LogEntryLog

LogEntryLogFromID adopts an existing Objective-C object as a LogEntryLog (nil for 0), retaining it and registering a release finalizer.

func NewLogEntryLog added in v0.17.0

func NewLogEntryLog() *LogEntryLog

NewLogEntryLog creates a new LogEntryLog.

func (*LogEntryLog) Level added in v0.17.0

func (lel *LogEntryLog) Level() LogEntryLogLevel

Level returns the level of the entry, e.g., info, debug.

type LogEntryLogLevel added in v0.17.0

type LogEntryLogLevel int64
const (
	LogEntryLogLevelUndefined LogEntryLogLevel = 0
	LogEntryLogLevelDebug     LogEntryLogLevel = 1
	LogEntryLogLevelInfo      LogEntryLogLevel = 2
	LogEntryLogLevelNotice    LogEntryLogLevel = 3
	LogEntryLogLevelError     LogEntryLogLevel = 4
	LogEntryLogLevelFault     LogEntryLogLevel = 5
)

func (LogEntryLogLevel) String added in v0.17.0

func (e LogEntryLogLevel) String() string

String returns the LogEntryLogLevel constant's name, or its numeric form when the value is not a known constant.

type LogEntryProvider added in v0.17.0

type LogEntryProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

LogEntryProvider is accepted wherever a OSLogEntry (or one of its subclasses) is expected.

type LogEntrySignpost added in v0.17.0

type LogEntrySignpost struct {
	LogEntry
}

LogEntrySignpost is an idiomatic wrapper over the Objective-C class OSLogEntrySignpost.

It embeds LogEntry, promoting that type's methods.

An entry containing a signpost.

func LogEntrySignpostFromID added in v0.17.0

func LogEntrySignpostFromID(id objc.ID) *LogEntrySignpost

LogEntrySignpostFromID adopts an existing Objective-C object as a LogEntrySignpost (nil for 0), retaining it and registering a release finalizer.

func NewLogEntrySignpost added in v0.17.0

func NewLogEntrySignpost() *LogEntrySignpost

NewLogEntrySignpost creates a new LogEntrySignpost.

func (*LogEntrySignpost) SignpostIdentifier added in v0.17.0

func (les *LogEntrySignpost) SignpostIdentifier() uint64

SignpostIdentifier returns the signpost ID associated with this entry.

func (*LogEntrySignpost) SignpostName added in v0.17.0

func (les *LogEntrySignpost) SignpostName() string

SignpostName returns the signpost name associated with this entry.

func (*LogEntrySignpost) SignpostType added in v0.17.0

func (les *LogEntrySignpost) SignpostType() LogEntrySignpostType

SignpostType returns the signpost type associated with this entry.

type LogEntrySignpostType added in v0.17.0

type LogEntrySignpostType int64
const (
	LogEntrySignpostTypeUndefined     LogEntrySignpostType = 0
	LogEntrySignpostTypeIntervalBegin LogEntrySignpostType = 1
	LogEntrySignpostTypeIntervalEnd   LogEntrySignpostType = 2
	LogEntrySignpostTypeEvent         LogEntrySignpostType = 3
)

func (LogEntrySignpostType) String added in v0.17.0

func (e LogEntrySignpostType) String() string

String returns the LogEntrySignpostType constant's name, or its numeric form when the value is not a known constant.

type LogEntryStoreCategory added in v0.17.0

type LogEntryStoreCategory int64
const (
	LogEntryStoreCategoryUndefined    LogEntryStoreCategory = 0
	LogEntryStoreCategoryMetadata     LogEntryStoreCategory = 1
	LogEntryStoreCategoryShortTerm    LogEntryStoreCategory = 2
	LogEntryStoreCategoryLongTermAuto LogEntryStoreCategory = 3
	LogEntryStoreCategoryLongTerm1    LogEntryStoreCategory = 4
	LogEntryStoreCategoryLongTerm3    LogEntryStoreCategory = 5
	LogEntryStoreCategoryLongTerm7    LogEntryStoreCategory = 6
	LogEntryStoreCategoryLongTerm14   LogEntryStoreCategory = 7
	LogEntryStoreCategoryLongTerm30   LogEntryStoreCategory = 8
)

func (LogEntryStoreCategory) String added in v0.17.0

func (e LogEntryStoreCategory) String() string

String returns the LogEntryStoreCategory constant's name, or its numeric form when the value is not a known constant.

type LogEntryWithPayload added in v0.17.0

type LogEntryWithPayload interface {
	Category() string
	Components() []*LogMessageComponent
	FormatString() string
	Subsystem() string
}

LogEntryWithPayload is the Go form of the Objective-C protocol OSLogEntryWithPayload.

type LogEnumerator added in v0.17.0

type LogEnumerator struct {
	objref.Handle
}

LogEnumerator is an idiomatic wrapper over the Objective-C class OSLogEnumerator.

An enumerator that can access and list log entries.

func LogEnumeratorFromID added in v0.17.0

func LogEnumeratorFromID(id objc.ID) *LogEnumerator

LogEnumeratorFromID adopts an existing Objective-C object as a LogEnumerator (nil for 0), retaining it and registering a release finalizer.

func NewLogEnumerator added in v0.17.0

func NewLogEnumerator() *LogEnumerator

NewLogEnumerator creates a new LogEnumerator.

func (*LogEnumerator) Description added in v0.17.0

func (le *LogEnumerator) Description() string

Description returns the object's -description text.

func (*LogEnumerator) IsEqual added in v0.17.0

func (le *LogEnumerator) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*LogEnumerator) IsKind added in v0.17.0

func (le *LogEnumerator) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*LogEnumerator) String added in v0.17.0

func (le *LogEnumerator) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type LogEnumeratorOptions added in v0.17.0

type LogEnumeratorOptions uint64

Bitmask — values may be combined with |.

const (
	LogEnumeratorReverse LogEnumeratorOptions = 1
)

func (LogEnumeratorOptions) String added in v0.17.0

func (e LogEnumeratorOptions) String() string

String returns the LogEnumeratorOptions constant's name, or its numeric form when the value is not a known constant.

type LogMessageComponent added in v0.17.0

type LogMessageComponent struct {
	objref.Handle
}

LogMessageComponent is an idiomatic wrapper over the Objective-C class OSLogMessageComponent.

The message arguments for a particular entry.

func LogMessageComponentFromID added in v0.17.0

func LogMessageComponentFromID(id objc.ID) *LogMessageComponent

LogMessageComponentFromID adopts an existing Objective-C object as a LogMessageComponent (nil for 0), retaining it and registering a release finalizer.

func NewLogMessageComponent added in v0.17.0

func NewLogMessageComponent() *LogMessageComponent

NewLogMessageComponent creates a new LogMessageComponent.

func (*LogMessageComponent) ArgumentCategory added in v0.17.0

ArgumentCategory returns the type of argument corresponding to the placeholder; see OSLogMessageComponentArgumentCategory.

func (*LogMessageComponent) ArgumentDataValue added in v0.17.0

func (lmc *LogMessageComponent) ArgumentDataValue() []byte

ArgumentDataValue returns the argument as a sequence of bytes. Can be nil if the argument cannot be decoded (for example, it could be redacted), or if this is the last component.

func (*LogMessageComponent) ArgumentDoubleValue added in v0.17.0

func (lmc *LogMessageComponent) ArgumentDoubleValue() float64

ArgumentDoubleValue returns the argument as a double-precision floating point number; the value is undefined if the argument cannot be decoded or if this is the last component.

func (*LogMessageComponent) ArgumentInt64Value added in v0.17.0

func (lmc *LogMessageComponent) ArgumentInt64Value() int64

ArgumentInt64Value returns the argument as a 64-bit signed integer; the value is undefined if it cannot be decoded or if this is the last component.

func (*LogMessageComponent) ArgumentNumberValue added in v0.17.0

func (lmc *LogMessageComponent) ArgumentNumberValue() *foundation.Number

ArgumentNumberValue returns the argument as a number. Can be nil if the argument cannot be decoded (for example, it could be redacted), or if this is the last component.

func (*LogMessageComponent) ArgumentStringValue added in v0.17.0

func (lmc *LogMessageComponent) ArgumentStringValue() string

ArgumentStringValue returns the argument as a string. Can be nil if the argument cannot be decoded (for example, it could be redacted), or if this is the last component.

func (*LogMessageComponent) ArgumentUInt64Value added in v0.17.0

func (lmc *LogMessageComponent) ArgumentUInt64Value() uint64

ArgumentUInt64Value returns the argument as a 64-bit unsigned integer; the value is undefined if the argument cannot be decoded or if this is the last component.

func (*LogMessageComponent) Description added in v0.17.0

func (lmc *LogMessageComponent) Description() string

Description returns the object's -description text.

func (*LogMessageComponent) FormatSubstring added in v0.17.0

func (lmc *LogMessageComponent) FormatSubstring() string

FormatSubstring returns the text immediately preceding a placeholder. This can be an empty string if there is nothing between two placeholders, or between the placeholder and the bounds of the string.

func (*LogMessageComponent) IsEqual added in v0.17.0

func (lmc *LogMessageComponent) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*LogMessageComponent) IsKind added in v0.17.0

func (lmc *LogMessageComponent) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*LogMessageComponent) Placeholder added in v0.17.0

func (lmc *LogMessageComponent) Placeholder() string

Placeholder returns the placeholder text. Is empty for is the last component.

func (*LogMessageComponent) String added in v0.17.0

func (lmc *LogMessageComponent) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type LogMessageComponentArgumentCategory added in v0.17.0

type LogMessageComponentArgumentCategory int64
const (
	LogMessageComponentArgumentCategoryUndefined LogMessageComponentArgumentCategory = 0
	LogMessageComponentArgumentCategoryData      LogMessageComponentArgumentCategory = 1
	LogMessageComponentArgumentCategoryDouble    LogMessageComponentArgumentCategory = 2
	LogMessageComponentArgumentCategoryInt64     LogMessageComponentArgumentCategory = 3
	LogMessageComponentArgumentCategoryString    LogMessageComponentArgumentCategory = 4
	LogMessageComponentArgumentCategoryUInt64    LogMessageComponentArgumentCategory = 5
)

func (LogMessageComponentArgumentCategory) String added in v0.17.0

String returns the LogMessageComponentArgumentCategory constant's name, or its numeric form when the value is not a known constant.

type LogPosition added in v0.17.0

type LogPosition struct {
	objref.Handle
}

LogPosition is an idiomatic wrapper over the Objective-C class OSLogPosition.

A representation of a point in a sequence of entries in the unified logging system.

func LogPositionFromID added in v0.17.0

func LogPositionFromID(id objc.ID) *LogPosition

LogPositionFromID adopts an existing Objective-C object as a LogPosition (nil for 0), retaining it and registering a release finalizer.

func NewLogPosition added in v0.17.0

func NewLogPosition() *LogPosition

NewLogPosition creates a new LogPosition.

func (*LogPosition) Description added in v0.17.0

func (lp *LogPosition) Description() string

Description returns the object's -description text.

func (*LogPosition) IsEqual added in v0.17.0

func (lp *LogPosition) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*LogPosition) IsKind added in v0.17.0

func (lp *LogPosition) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*LogPosition) String added in v0.17.0

func (lp *LogPosition) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type LogStore added in v0.17.0

type LogStore struct {
	objref.Handle
}

LogStore is an idiomatic wrapper over the Objective-C class OSLogStore.

A set of entries from the unified logging system.

func LocalStore added in v0.17.0

func LocalStore() (result *LogStore, err error)

LocalStore creates a log store representing the Mac’s local store.

func LogStoreFromID added in v0.17.0

func LogStoreFromID(id objc.ID) *LogStore

LogStoreFromID adopts an existing Objective-C object as a LogStore (nil for 0), retaining it and registering a release finalizer.

func NewLogStore added in v0.17.0

func NewLogStore() *LogStore

NewLogStore creates a new LogStore.

func StoreWithScope added in v0.17.0

func StoreWithScope(scope LogStoreScope) (result *LogStore, err error)

StoreWithScope create an OSLogStore for a subset of entries in the local store.

func StoreWithURL added in v0.17.0

func StoreWithURL(url string) (result *LogStore, err error)

StoreWithURL creates a log store based on a log archive.

func (*LogStore) Description added in v0.17.0

func (ls *LogStore) Description() string

Description returns the object's -description text.

func (*LogStore) EntriesEnumerator added in v0.17.0

func (ls *LogStore) EntriesEnumerator() (result *LogEnumerator, err error)

EntriesEnumerator returns a log enumerator with default options for viewing the entries.

func (*LogStore) EntriesEnumeratorWithOptionsPositionPredicate added in v0.17.0

func (ls *LogStore) EntriesEnumeratorWithOptionsPositionPredicate(options LogEnumeratorOptions, position *LogPosition, predicate obj.Object) (result *LogEnumerator, err error)

EntriesEnumeratorWithOptionsPositionPredicate returns a log enumerator based on an underlying store.

func (*LogStore) IsEqual added in v0.17.0

func (ls *LogStore) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*LogStore) IsKind added in v0.17.0

func (ls *LogStore) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*LogStore) PositionWithDate added in v0.17.0

func (ls *LogStore) PositionWithDate(date time.Time) *LogPosition

PositionWithDate returns a position representing the time specified.

func (*LogStore) PositionWithTimeIntervalSinceEnd added in v0.17.0

func (ls *LogStore) PositionWithTimeIntervalSinceEnd(seconds float64) *LogPosition

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

func (*LogStore) PositionWithTimeIntervalSinceLatestBoot added in v0.17.0

func (ls *LogStore) PositionWithTimeIntervalSinceLatestBoot(seconds float64) *LogPosition

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

func (*LogStore) String added in v0.17.0

func (ls *LogStore) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type LogStoreScope added in v0.17.0

type LogStoreScope int64
const (
	LogStoreSystem                   LogStoreScope = 0
	LogStoreCurrentProcessIdentifier LogStoreScope = 1
)

func (LogStoreScope) String added in v0.17.0

func (e LogStoreScope) String() string

String returns the LogStoreScope constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type OSActivityFlag added in v0.17.0

type OSActivityFlag uint32
const (
	OSActivityFlagDefault       OSActivityFlag = 0
	OSActivityFlagDetached      OSActivityFlag = 1
	OSActivityFlagIfNonePresent OSActivityFlag = 2
)

func (OSActivityFlag) String added in v0.17.0

func (e OSActivityFlag) String() string

String returns the OSActivityFlag constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type OSLogType added in v0.17.0

type OSLogType uint8
const (
	OSLogTypeDefault OSLogType = 0
	OSLogTypeInfo    OSLogType = 1
	OSLogTypeDebug   OSLogType = 2
	OSLogTypeError   OSLogType = 16
	OSLogTypeFault   OSLogType = 17
)

func (OSLogType) String added in v0.17.0

func (e OSLogType) String() string

String returns the OSLogType constant's name, or its numeric form when the value is not a known constant.

type OSSignpostType added in v0.17.0

type OSSignpostType uint8
const (
	OSSignpostTypeEvent         OSSignpostType = 0
	OSSignpostTypeIntervalBegin OSSignpostType = 1
	OSSignpostTypeIntervalEnd   OSSignpostType = 2
)

func (OSSignpostType) String added in v0.17.0

func (e OSSignpostType) String() string

String returns the OSSignpostType constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type TaskSharedRegionStubs

type TaskSharedRegionStubs uint8
const (
	TaskSharedRegionStubsDev  TaskSharedRegionStubs = 1
	TaskSharedRegionStubsProd TaskSharedRegionStubs = 2
)

func (TaskSharedRegionStubs) String

func (e TaskSharedRegionStubs) String() string

String returns the TaskSharedRegionStubs constant's name, or its numeric form when the value is not a known constant.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                  VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE       VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE        VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE   VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE   VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE        VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE        VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12
	// Guard exception sent to a thread when a CoW defeatured map attempts to copy memory which is not permitted by system policy.
	KGUARD_EXC_COW_DEFEATURED_COPY_DENIED VirtualMemoryGuardExceptionCode = 13
	// Guard exception sent to a thread when it attempts to extract a given type of memory in a way which is not permitted for CoW defeatured maps.
	KGUARD_EXC_COW_DEFEATURED_EXTRACT_DENIED VirtualMemoryGuardExceptionCode = 14
	// Guard exception sent to a thread when it attempts to copy-map a memory entry which was created for sharing by a CoW defeatured map.
	KGUARD_EXC_COW_DEFEATURED_SHARE_MAP_AS_COPY_DENIED VirtualMemoryGuardExceptionCode = 15
	KGUARD_EXC_COW_DEFEATURED_FIRST                    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_COW_DEFEATURED_LAST                     VirtualMemoryGuardExceptionCode = 15
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY              VirtualMemoryGuardExceptionCode = 16
	KGUARD_EXC_SEC_ACCESS_FAULT                        VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT                  VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED                         VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED                      VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                          VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT                    VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT                    VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT           VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT           VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL