Documentation
¶
Overview ¶
Package oslog provides Go bindings for the OSLog framework.
A unified logging system for the reading of historical data.
The OSLog framework allows you to read logs. With the unified logging system, you can build custom debugging and analysis tools to be used alongside Apple tools like Instruments and Console. To learn more about how to create logs, see [Logging].
Read Log Entries ¶
- OSLogStore: A set of entries from the unified logging system.
- OSLogEnumerator: An enumerator that can access and list log entries.
Log Entries ¶
- OSLogEntry: A single entry from the unified logging system.
- OSLogEntryActivity: An entry generated by an activity event.
- OSLogEntryBoundary: The metadata that partitions sequences of other entries.
- OSLogEntryLog: A log entry.
- OSLogEntrySignpost: An entry containing a signpost.
- OSLogEntryFromProcess: A protocol that defines subclasses containing metadata about a process.
- OSLogEntryWithPayload: A protocol defining subclasses that represent entries made using a handle and a format string.
Entry Data ¶
- OSLogMessageComponent: The message arguments for a particular entry.
- OSLogPosition: A representation of a point in a sequence of entries in the unified logging system.
Key Types ¶
- OSLogEntrySignpost - An entry containing a signpost.
- OSLogEntryLog - A log entry.
- OSLogEntryActivity - An entry generated by an activity event.
- OSLogMessageComponent - The message arguments for a particular entry.
- OSLogStore - A set of entries from the unified logging system.
- OSLogEntry - A single entry from the unified logging system.
- OSLogEntryBoundary - The metadata that partitions sequences of other entries.
- OSLogEnumerator - An enumerator that can access and list log entries.
- OSLogPosition - A representation of a point in a sequence of entries in the unified logging system.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- type IOSLogEntry
- type IOSLogEntryActivity
- type IOSLogEntryBoundary
- type IOSLogEntryLog
- type IOSLogEntrySignpost
- type IOSLogEnumerator
- type IOSLogMessageComponent
- type IOSLogPosition
- type IOSLogStore
- type OSLogEntry
- type OSLogEntryActivity
- func (o OSLogEntryActivity) ActivityIdentifier() uint64
- func (o OSLogEntryActivity) Autorelease() OSLogEntryActivity
- func (o OSLogEntryActivity) Init() OSLogEntryActivity
- func (o OSLogEntryActivity) ParentActivityIdentifier() uint64
- func (o OSLogEntryActivity) Process() string
- func (o OSLogEntryActivity) ProcessIdentifier() int32
- func (o OSLogEntryActivity) Sender() string
- func (o OSLogEntryActivity) ThreadIdentifier() uint64
- type OSLogEntryActivityClass
- type OSLogEntryBoundary
- type OSLogEntryBoundaryClass
- type OSLogEntryClass
- type OSLogEntryFromProcess
- type OSLogEntryFromProcessObject
- func (o OSLogEntryFromProcessObject) ActivityIdentifier() uint64
- func (o OSLogEntryFromProcessObject) BaseObject() objectivec.Object
- func (o OSLogEntryFromProcessObject) Process() string
- func (o OSLogEntryFromProcessObject) ProcessIdentifier() int32
- func (o OSLogEntryFromProcessObject) Sender() string
- func (o OSLogEntryFromProcessObject) ThreadIdentifier() uint64
- type OSLogEntryLog
- func (o OSLogEntryLog) ActivityIdentifier() uint64
- func (o OSLogEntryLog) Autorelease() OSLogEntryLog
- func (o OSLogEntryLog) Category() string
- func (o OSLogEntryLog) Components() []OSLogMessageComponent
- func (o OSLogEntryLog) FormatString() string
- func (o OSLogEntryLog) Init() OSLogEntryLog
- func (o OSLogEntryLog) Level() OSLogEntryLogLevel
- func (o OSLogEntryLog) Process() string
- func (o OSLogEntryLog) ProcessIdentifier() int32
- func (o OSLogEntryLog) Sender() string
- func (o OSLogEntryLog) Subsystem() string
- func (o OSLogEntryLog) ThreadIdentifier() uint64
- type OSLogEntryLogClass
- type OSLogEntryLogLevel
- type OSLogEntrySignpost
- func (o OSLogEntrySignpost) ActivityIdentifier() uint64
- func (o OSLogEntrySignpost) Autorelease() OSLogEntrySignpost
- func (o OSLogEntrySignpost) Category() string
- func (o OSLogEntrySignpost) Components() []OSLogMessageComponent
- func (o OSLogEntrySignpost) FormatString() string
- func (o OSLogEntrySignpost) Init() OSLogEntrySignpost
- func (o OSLogEntrySignpost) Process() string
- func (o OSLogEntrySignpost) ProcessIdentifier() int32
- func (o OSLogEntrySignpost) Sender() string
- func (o OSLogEntrySignpost) SignpostIdentifier() uint64
- func (o OSLogEntrySignpost) SignpostName() string
- func (o OSLogEntrySignpost) SignpostType() OSLogEntrySignpostType
- func (o OSLogEntrySignpost) Subsystem() string
- func (o OSLogEntrySignpost) ThreadIdentifier() uint64
- type OSLogEntrySignpostClass
- type OSLogEntrySignpostType
- type OSLogEntryStoreCategory
- type OSLogEntryWithPayload
- type OSLogEntryWithPayloadObject
- func (o OSLogEntryWithPayloadObject) BaseObject() objectivec.Object
- func (o OSLogEntryWithPayloadObject) Category() string
- func (o OSLogEntryWithPayloadObject) Components() []OSLogMessageComponent
- func (o OSLogEntryWithPayloadObject) FormatString() string
- func (o OSLogEntryWithPayloadObject) Subsystem() string
- type OSLogEnumerator
- type OSLogEnumeratorClass
- type OSLogEnumeratorOptions
- type OSLogMessageComponent
- func (o OSLogMessageComponent) Argument() unsafe.Pointer
- func (o OSLogMessageComponent) ArgumentCategory() OSLogMessageComponentArgumentCategory
- func (o OSLogMessageComponent) ArgumentDataValue() foundation.NSData
- func (o OSLogMessageComponent) ArgumentDoubleValue() float64
- func (o OSLogMessageComponent) ArgumentInt64Value() int64
- func (o OSLogMessageComponent) ArgumentNumberValue() foundation.NSNumber
- func (o OSLogMessageComponent) ArgumentStringValue() string
- func (o OSLogMessageComponent) ArgumentUInt64Value() uint64
- func (o OSLogMessageComponent) Autorelease() OSLogMessageComponent
- func (o OSLogMessageComponent) EncodeWithCoder(coder foundation.INSCoder)
- func (o OSLogMessageComponent) FormatSubstring() string
- func (o OSLogMessageComponent) Init() OSLogMessageComponent
- func (o OSLogMessageComponent) Placeholder() string
- func (o OSLogMessageComponent) SetArgument(value unsafe.Pointer)
- type OSLogMessageComponentArgumentCategory
- type OSLogMessageComponentClass
- type OSLogPosition
- type OSLogPositionClass
- type OSLogStore
- func (o OSLogStore) Autorelease() OSLogStore
- func (o OSLogStore) EntriesEnumeratorAndReturnError() (IOSLogEnumerator, error)
- func (o OSLogStore) EntriesEnumeratorWithOptionsPositionPredicateError(options OSLogEnumeratorOptions, position IOSLogPosition, ...) (IOSLogEnumerator, error)
- func (o OSLogStore) Init() OSLogStore
- func (o OSLogStore) PositionWithDate(date foundation.NSDate) IOSLogPosition
- func (o OSLogStore) PositionWithTimeIntervalSinceEnd(seconds foundation.NSTimeInterval) IOSLogPosition
- func (o OSLogStore) PositionWithTimeIntervalSinceLatestBoot(seconds foundation.NSTimeInterval) IOSLogPosition
- type OSLogStoreClass
- type OSLogStoreScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IOSLogEntry ¶
type IOSLogEntry interface {
objectivec.IObject
// The fully formatted message for the entry.
ComposedMessage() string
// The timestamp of the entry.
Date() foundation.NSDate
// The current log entry’s storage tag.
StoreCategory() OSLogEntryStoreCategory
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the OSLogEntry class.
Accessing Log Entry Data ¶
- IOSLogEntry.ComposedMessage: The fully formatted message for the entry.
- IOSLogEntry.Date: The timestamp of the entry.
Accessing Store Categories ¶
- IOSLogEntry.StoreCategory: The current log entry’s storage tag.
See: https://developer.apple.com/documentation/OSLog/OSLogEntry
type IOSLogEntryActivity ¶
type IOSLogEntryActivity interface {
IOSLogEntry
// The identifier of the parent activity.
ParentActivityIdentifier() uint64
}
An interface definition for the OSLogEntryActivity class.
Identifying the Parent ¶
- IOSLogEntryActivity.ParentActivityIdentifier: The identifier of the parent activity.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryActivity
type IOSLogEntryBoundary ¶
type IOSLogEntryBoundary interface {
IOSLogEntry
}
An interface definition for the OSLogEntryBoundary class.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryBoundary
type IOSLogEntryLog ¶
type IOSLogEntryLog interface {
IOSLogEntry
// The log level of the entry.
Level() OSLogEntryLogLevel
}
An interface definition for the OSLogEntryLog class.
Accessing Log Levels ¶
- IOSLogEntryLog.Level: The log level of the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryLog
type IOSLogEntrySignpost ¶
type IOSLogEntrySignpost interface {
IOSLogEntry
// The signpost’s identifier.
SignpostIdentifier() uint64
// The signpost’s name.
SignpostName() string
// The signpost’s type.
SignpostType() OSLogEntrySignpostType
}
An interface definition for the OSLogEntrySignpost class.
Accessing Signpost Details ¶
- IOSLogEntrySignpost.SignpostIdentifier: The signpost’s identifier.
- IOSLogEntrySignpost.SignpostName: The signpost’s name.
Accessing Signpost Types ¶
- IOSLogEntrySignpost.SignpostType: The signpost’s type.
See: https://developer.apple.com/documentation/OSLog/OSLogEntrySignpost
type IOSLogEnumerator ¶
type IOSLogEnumerator interface {
foundation.INSEnumerator
}
An interface definition for the OSLogEnumerator class.
See: https://developer.apple.com/documentation/OSLog/OSLogEnumerator
type IOSLogMessageComponent ¶
type IOSLogMessageComponent interface {
objectivec.IObject
// The argument passed into the message component.
Argument() unsafe.Pointer
SetArgument(value unsafe.Pointer)
// The type of argument that corresponds to the placeholder.
ArgumentCategory() OSLogMessageComponentArgumentCategory
// The text immediately preceding a placeholder.
FormatSubstring() string
// The placeholder text for the message component.
Placeholder() string
// The argument formatted as a sequence of bytes.
ArgumentDataValue() foundation.NSData
// The argument formatted as a double.
ArgumentDoubleValue() float64
// The argument formatted as a signed 64-bit integer.
ArgumentInt64Value() int64
// The argument formatted as a number.
ArgumentNumberValue() foundation.NSNumber
// The argument formatted as a string.
ArgumentStringValue() string
// The argument formatted as an unsigned 64-bit integer.
ArgumentUInt64Value() uint64
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the OSLogMessageComponent class.
Reading the Argument ¶
- IOSLogMessageComponent.Argument: The argument passed into the message component.
- IOSLogMessageComponent.SetArgument
- IOSLogMessageComponent.ArgumentCategory: The type of argument that corresponds to the placeholder.
Reading the Message Component ¶
- IOSLogMessageComponent.FormatSubstring: The text immediately preceding a placeholder.
- IOSLogMessageComponent.Placeholder: The placeholder text for the message component.
Accessing the Argument ¶
- IOSLogMessageComponent.ArgumentDataValue: The argument formatted as a sequence of bytes.
- IOSLogMessageComponent.ArgumentDoubleValue: The argument formatted as a double.
- IOSLogMessageComponent.ArgumentInt64Value: The argument formatted as a signed 64-bit integer.
- IOSLogMessageComponent.ArgumentNumberValue: The argument formatted as a number.
- IOSLogMessageComponent.ArgumentStringValue: The argument formatted as a string.
- IOSLogMessageComponent.ArgumentUInt64Value: The argument formatted as an unsigned 64-bit integer.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent
type IOSLogPosition ¶
type IOSLogPosition interface {
objectivec.IObject
}
An interface definition for the OSLogPosition class.
See: https://developer.apple.com/documentation/OSLog/OSLogPosition
type IOSLogStore ¶
type IOSLogStore interface {
objectivec.IObject
// Returns a position representing the time specified.
PositionWithDate(date foundation.NSDate) IOSLogPosition
// Returns a position representing time since the end of the time range that the entries span.
PositionWithTimeIntervalSinceEnd(seconds foundation.NSTimeInterval) IOSLogPosition
// Returns a position representing time since the last boot in the series of entries.
PositionWithTimeIntervalSinceLatestBoot(seconds foundation.NSTimeInterval) IOSLogPosition
// Returns a log enumerator with default options for viewing the entries.
EntriesEnumeratorAndReturnError() (IOSLogEnumerator, error)
// Returns a log enumerator based on an underlying store.
EntriesEnumeratorWithOptionsPositionPredicateError(options OSLogEnumeratorOptions, position IOSLogPosition, predicate foundation.NSPredicate) (IOSLogEnumerator, error)
}
An interface definition for the OSLogStore class.
Accessing Position ¶
- IOSLogStore.PositionWithDate: Returns a position representing the time specified.
- IOSLogStore.PositionWithTimeIntervalSinceEnd: Returns a position representing time since the end of the time range that the entries span.
- IOSLogStore.PositionWithTimeIntervalSinceLatestBoot: Returns a position representing time since the last boot in the series of entries.
See: https://developer.apple.com/documentation/OSLog/OSLogStore
type OSLogEntry ¶
type OSLogEntry struct {
objectivec.Object
}
A single entry from the unified logging system.
Accessing Log Entry Data ¶
- OSLogEntry.ComposedMessage: The fully formatted message for the entry.
- OSLogEntry.Date: The timestamp of the entry.
Accessing Store Categories ¶
- OSLogEntry.StoreCategory: The current log entry’s storage tag.
See: https://developer.apple.com/documentation/OSLog/OSLogEntry
func NewOSLogEntry ¶
func NewOSLogEntry() OSLogEntry
NewOSLogEntry creates a new OSLogEntry instance.
func OSLogEntryFromID ¶
func OSLogEntryFromID(id objc.ID) OSLogEntry
OSLogEntryFromID constructs a OSLogEntry from an objc.ID.
A single entry from the unified logging system.
func (OSLogEntry) Autorelease ¶
func (o OSLogEntry) Autorelease() OSLogEntry
Autorelease adds the receiver to the current autorelease pool.
func (OSLogEntry) ComposedMessage ¶
func (o OSLogEntry) ComposedMessage() string
The fully formatted message for the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntry/composedMessage
func (OSLogEntry) Date ¶
func (o OSLogEntry) Date() foundation.NSDate
The timestamp of the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntry/date
func (OSLogEntry) EncodeWithCoder ¶
func (o OSLogEntry) EncodeWithCoder(coder foundation.INSCoder)
func (OSLogEntry) StoreCategory ¶
func (o OSLogEntry) StoreCategory() OSLogEntryStoreCategory
The current log entry’s storage tag.
See: https://developer.apple.com/documentation/OSLog/OSLogEntry/storeCategory-swift.property
type OSLogEntryActivity ¶
type OSLogEntryActivity struct {
OSLogEntry
}
An entry generated by an activity event.
Identifying the Parent ¶
- OSLogEntryActivity.ParentActivityIdentifier: The identifier of the parent activity.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryActivity
func NewOSLogEntryActivity ¶
func NewOSLogEntryActivity() OSLogEntryActivity
NewOSLogEntryActivity creates a new OSLogEntryActivity instance.
func OSLogEntryActivityFromID ¶
func OSLogEntryActivityFromID(id objc.ID) OSLogEntryActivity
OSLogEntryActivityFromID constructs a OSLogEntryActivity from an objc.ID.
An entry generated by an activity event.
func (OSLogEntryActivity) ActivityIdentifier ¶
func (o OSLogEntryActivity) ActivityIdentifier() uint64
The activity identifier associated with the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/activityIdentifier
func (OSLogEntryActivity) Autorelease ¶
func (o OSLogEntryActivity) Autorelease() OSLogEntryActivity
Autorelease adds the receiver to the current autorelease pool.
func (OSLogEntryActivity) Init ¶
func (o OSLogEntryActivity) Init() OSLogEntryActivity
Init initializes the instance.
func (OSLogEntryActivity) ParentActivityIdentifier ¶
func (o OSLogEntryActivity) ParentActivityIdentifier() uint64
The identifier of the parent activity.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryActivity/parentActivityIdentifier
func (OSLogEntryActivity) Process ¶
func (o OSLogEntryActivity) Process() string
The name of the process that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/process
func (OSLogEntryActivity) ProcessIdentifier ¶
func (o OSLogEntryActivity) ProcessIdentifier() int32
The process identifier that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/processIdentifier
func (OSLogEntryActivity) Sender ¶
func (o OSLogEntryActivity) Sender() string
The name of the binary image that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/sender
func (OSLogEntryActivity) ThreadIdentifier ¶
func (o OSLogEntryActivity) ThreadIdentifier() uint64
The identifier of the thread that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/threadIdentifier
type OSLogEntryActivityClass ¶
type OSLogEntryActivityClass struct {
// contains filtered or unexported fields
}
func GetOSLogEntryActivityClass ¶
func GetOSLogEntryActivityClass() OSLogEntryActivityClass
GetOSLogEntryActivityClass returns the class object for OSLogEntryActivity.
func (OSLogEntryActivityClass) Alloc ¶
func (oc OSLogEntryActivityClass) Alloc() OSLogEntryActivity
Alloc allocates memory for a new instance of the class.
func (OSLogEntryActivityClass) Class ¶
func (oc OSLogEntryActivityClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogEntryBoundary ¶
type OSLogEntryBoundary struct {
OSLogEntry
}
The metadata that partitions sequences of other entries.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryBoundary
func NewOSLogEntryBoundary ¶
func NewOSLogEntryBoundary() OSLogEntryBoundary
NewOSLogEntryBoundary creates a new OSLogEntryBoundary instance.
func OSLogEntryBoundaryFromID ¶
func OSLogEntryBoundaryFromID(id objc.ID) OSLogEntryBoundary
OSLogEntryBoundaryFromID constructs a OSLogEntryBoundary from an objc.ID.
The metadata that partitions sequences of other entries.
func (OSLogEntryBoundary) Autorelease ¶
func (o OSLogEntryBoundary) Autorelease() OSLogEntryBoundary
Autorelease adds the receiver to the current autorelease pool.
func (OSLogEntryBoundary) Init ¶
func (o OSLogEntryBoundary) Init() OSLogEntryBoundary
Init initializes the instance.
type OSLogEntryBoundaryClass ¶
type OSLogEntryBoundaryClass struct {
// contains filtered or unexported fields
}
func GetOSLogEntryBoundaryClass ¶
func GetOSLogEntryBoundaryClass() OSLogEntryBoundaryClass
GetOSLogEntryBoundaryClass returns the class object for OSLogEntryBoundary.
func (OSLogEntryBoundaryClass) Alloc ¶
func (oc OSLogEntryBoundaryClass) Alloc() OSLogEntryBoundary
Alloc allocates memory for a new instance of the class.
func (OSLogEntryBoundaryClass) Class ¶
func (oc OSLogEntryBoundaryClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogEntryClass ¶
type OSLogEntryClass struct {
// contains filtered or unexported fields
}
func GetOSLogEntryClass ¶
func GetOSLogEntryClass() OSLogEntryClass
GetOSLogEntryClass returns the class object for OSLogEntry.
func (OSLogEntryClass) Alloc ¶
func (oc OSLogEntryClass) Alloc() OSLogEntry
Alloc allocates memory for a new instance of the class.
func (OSLogEntryClass) Class ¶
func (oc OSLogEntryClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogEntryFromProcess ¶
type OSLogEntryFromProcess interface {
objectivec.IObject
// The activity identifier associated with the entry.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/activityIdentifier
ActivityIdentifier() uint64
// The name of the process that made the entry.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/process
Process() string
// The process identifier that made the entry.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/processIdentifier
ProcessIdentifier() int32
// The name of the binary image that made the entry.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/sender
Sender() string
// The identifier of the thread that made the entry.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/threadIdentifier
ThreadIdentifier() uint64
}
A protocol that defines subclasses containing metadata about a process.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess
type OSLogEntryFromProcessObject ¶
type OSLogEntryFromProcessObject struct {
objectivec.Object
}
OSLogEntryFromProcessObject wraps an existing Objective-C object that conforms to the OSLogEntryFromProcess protocol.
func OSLogEntryFromProcessObjectFromID ¶
func OSLogEntryFromProcessObjectFromID(id objc.ID) OSLogEntryFromProcessObject
OSLogEntryFromProcessObjectFromID constructs a OSLogEntryFromProcessObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (OSLogEntryFromProcessObject) ActivityIdentifier ¶
func (o OSLogEntryFromProcessObject) ActivityIdentifier() uint64
The activity identifier associated with the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/activityIdentifier
func (OSLogEntryFromProcessObject) BaseObject ¶
func (o OSLogEntryFromProcessObject) BaseObject() objectivec.Object
func (OSLogEntryFromProcessObject) Process ¶
func (o OSLogEntryFromProcessObject) Process() string
The name of the process that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/process
func (OSLogEntryFromProcessObject) ProcessIdentifier ¶
func (o OSLogEntryFromProcessObject) ProcessIdentifier() int32
The process identifier that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/processIdentifier
func (OSLogEntryFromProcessObject) Sender ¶
func (o OSLogEntryFromProcessObject) Sender() string
The name of the binary image that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/sender
func (OSLogEntryFromProcessObject) ThreadIdentifier ¶
func (o OSLogEntryFromProcessObject) ThreadIdentifier() uint64
The identifier of the thread that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/threadIdentifier
type OSLogEntryLog ¶
type OSLogEntryLog struct {
OSLogEntry
}
A log entry.
Overview ¶
These log entries are generated by the os_log API. To learn more about how to generate a log entry, see os_log(_:dso:log:_:_:) and os_log(_:dso:log:type:_:).
Accessing Log Levels ¶
- OSLogEntryLog.Level: The log level of the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryLog
func NewOSLogEntryLog ¶
func NewOSLogEntryLog() OSLogEntryLog
NewOSLogEntryLog creates a new OSLogEntryLog instance.
func OSLogEntryLogFromID ¶
func OSLogEntryLogFromID(id objc.ID) OSLogEntryLog
OSLogEntryLogFromID constructs a OSLogEntryLog from an objc.ID.
A log entry.
func (OSLogEntryLog) ActivityIdentifier ¶
func (o OSLogEntryLog) ActivityIdentifier() uint64
The activity identifier associated with the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/activityIdentifier
func (OSLogEntryLog) Autorelease ¶
func (o OSLogEntryLog) Autorelease() OSLogEntryLog
Autorelease adds the receiver to the current autorelease pool.
func (OSLogEntryLog) Category ¶
func (o OSLogEntryLog) Category() string
The payload’s category.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/category
func (OSLogEntryLog) Components ¶
func (o OSLogEntryLog) Components() []OSLogMessageComponent
The payload’s components.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/components
func (OSLogEntryLog) FormatString ¶
func (o OSLogEntryLog) FormatString() string
The payload’s format string.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/formatString
func (OSLogEntryLog) Init ¶
func (o OSLogEntryLog) Init() OSLogEntryLog
Init initializes the instance.
func (OSLogEntryLog) Level ¶
func (o OSLogEntryLog) Level() OSLogEntryLogLevel
The log level of the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryLog/level-swift.property
func (OSLogEntryLog) Process ¶
func (o OSLogEntryLog) Process() string
The name of the process that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/process
func (OSLogEntryLog) ProcessIdentifier ¶
func (o OSLogEntryLog) ProcessIdentifier() int32
The process identifier that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/processIdentifier
func (OSLogEntryLog) Sender ¶
func (o OSLogEntryLog) Sender() string
The name of the binary image that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/sender
func (OSLogEntryLog) Subsystem ¶
func (o OSLogEntryLog) Subsystem() string
The payload’s subsystem.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/subsystem
func (OSLogEntryLog) ThreadIdentifier ¶
func (o OSLogEntryLog) ThreadIdentifier() uint64
The identifier of the thread that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/threadIdentifier
type OSLogEntryLogClass ¶
type OSLogEntryLogClass struct {
// contains filtered or unexported fields
}
func GetOSLogEntryLogClass ¶
func GetOSLogEntryLogClass() OSLogEntryLogClass
GetOSLogEntryLogClass returns the class object for OSLogEntryLog.
func (OSLogEntryLogClass) Alloc ¶
func (oc OSLogEntryLogClass) Alloc() OSLogEntryLog
Alloc allocates memory for a new instance of the class.
func (OSLogEntryLogClass) Class ¶
func (oc OSLogEntryLogClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogEntryLogLevel ¶
type OSLogEntryLogLevel int
See: https://developer.apple.com/documentation/OSLog/OSLogEntryLog/Level-swift.enum
const ( // OSLogEntryLogLevelDebug: A log level that captures diagnostic information. OSLogEntryLogLevelDebug OSLogEntryLogLevel = 1 // OSLogEntryLogLevelError: The log level that captures errors. OSLogEntryLogLevelError OSLogEntryLogLevel = 4 // OSLogEntryLogLevelFault: The log level that captures fault information. OSLogEntryLogLevelFault OSLogEntryLogLevel = 5 // OSLogEntryLogLevelInfo: The log level that captures additional information. OSLogEntryLogLevelInfo OSLogEntryLogLevel = 2 // OSLogEntryLogLevelNotice: The log level that captures notifications. OSLogEntryLogLevelNotice OSLogEntryLogLevel = 3 // OSLogEntryLogLevelUndefined: The log level was never specified. OSLogEntryLogLevelUndefined OSLogEntryLogLevel = 0 )
func (OSLogEntryLogLevel) String ¶
func (e OSLogEntryLogLevel) String() string
type OSLogEntrySignpost ¶
type OSLogEntrySignpost struct {
OSLogEntry
}
An entry containing a signpost.
Overview ¶
These entries are created by the os_signpost API. To learn more about signposts and how to create a signpost entry, see os_signpost(_:dso:log:name:signpostID:) and os_signpost(_:dso:log:name:signpostID:_:_:).
Accessing Signpost Details ¶
- OSLogEntrySignpost.SignpostIdentifier: The signpost’s identifier.
- OSLogEntrySignpost.SignpostName: The signpost’s name.
Accessing Signpost Types ¶
- OSLogEntrySignpost.SignpostType: The signpost’s type.
See: https://developer.apple.com/documentation/OSLog/OSLogEntrySignpost
func NewOSLogEntrySignpost ¶
func NewOSLogEntrySignpost() OSLogEntrySignpost
NewOSLogEntrySignpost creates a new OSLogEntrySignpost instance.
func OSLogEntrySignpostFromID ¶
func OSLogEntrySignpostFromID(id objc.ID) OSLogEntrySignpost
OSLogEntrySignpostFromID constructs a OSLogEntrySignpost from an objc.ID.
An entry containing a signpost.
func (OSLogEntrySignpost) ActivityIdentifier ¶
func (o OSLogEntrySignpost) ActivityIdentifier() uint64
The activity identifier associated with the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/activityIdentifier
func (OSLogEntrySignpost) Autorelease ¶
func (o OSLogEntrySignpost) Autorelease() OSLogEntrySignpost
Autorelease adds the receiver to the current autorelease pool.
func (OSLogEntrySignpost) Category ¶
func (o OSLogEntrySignpost) Category() string
The payload’s category.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/category
func (OSLogEntrySignpost) Components ¶
func (o OSLogEntrySignpost) Components() []OSLogMessageComponent
The payload’s components.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/components
func (OSLogEntrySignpost) FormatString ¶
func (o OSLogEntrySignpost) FormatString() string
The payload’s format string.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/formatString
func (OSLogEntrySignpost) Init ¶
func (o OSLogEntrySignpost) Init() OSLogEntrySignpost
Init initializes the instance.
func (OSLogEntrySignpost) Process ¶
func (o OSLogEntrySignpost) Process() string
The name of the process that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/process
func (OSLogEntrySignpost) ProcessIdentifier ¶
func (o OSLogEntrySignpost) ProcessIdentifier() int32
The process identifier that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/processIdentifier
func (OSLogEntrySignpost) Sender ¶
func (o OSLogEntrySignpost) Sender() string
The name of the binary image that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/sender
func (OSLogEntrySignpost) SignpostIdentifier ¶
func (o OSLogEntrySignpost) SignpostIdentifier() uint64
The signpost’s identifier.
See: https://developer.apple.com/documentation/OSLog/OSLogEntrySignpost/signpostIdentifier
func (OSLogEntrySignpost) SignpostName ¶
func (o OSLogEntrySignpost) SignpostName() string
The signpost’s name.
See: https://developer.apple.com/documentation/OSLog/OSLogEntrySignpost/signpostName
func (OSLogEntrySignpost) SignpostType ¶
func (o OSLogEntrySignpost) SignpostType() OSLogEntrySignpostType
The signpost’s type.
See: https://developer.apple.com/documentation/OSLog/OSLogEntrySignpost/signpostType-swift.property
func (OSLogEntrySignpost) Subsystem ¶
func (o OSLogEntrySignpost) Subsystem() string
The payload’s subsystem.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/subsystem
func (OSLogEntrySignpost) ThreadIdentifier ¶
func (o OSLogEntrySignpost) ThreadIdentifier() uint64
The identifier of the thread that made the entry.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryFromProcess/threadIdentifier
type OSLogEntrySignpostClass ¶
type OSLogEntrySignpostClass struct {
// contains filtered or unexported fields
}
func GetOSLogEntrySignpostClass ¶
func GetOSLogEntrySignpostClass() OSLogEntrySignpostClass
GetOSLogEntrySignpostClass returns the class object for OSLogEntrySignpost.
func (OSLogEntrySignpostClass) Alloc ¶
func (oc OSLogEntrySignpostClass) Alloc() OSLogEntrySignpost
Alloc allocates memory for a new instance of the class.
func (OSLogEntrySignpostClass) Class ¶
func (oc OSLogEntrySignpostClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogEntrySignpostType ¶
type OSLogEntrySignpostType int
See: https://developer.apple.com/documentation/OSLog/OSLogEntrySignpost/SignpostType-swift.enum
const ( // OSLogEntrySignpostTypeEvent: The signpost marks an event. OSLogEntrySignpostTypeEvent OSLogEntrySignpostType = 3 // OSLogEntrySignpostTypeIntervalBegin: The signpost marks the start of a time interval. OSLogEntrySignpostTypeIntervalBegin OSLogEntrySignpostType = 1 // OSLogEntrySignpostTypeIntervalEnd: The signpost marks the end of a time interval. OSLogEntrySignpostTypeIntervalEnd OSLogEntrySignpostType = 2 // OSLogEntrySignpostTypeUndefined: The signpost does not have a type. OSLogEntrySignpostTypeUndefined OSLogEntrySignpostType = 0 )
func (OSLogEntrySignpostType) String ¶
func (e OSLogEntrySignpostType) String() string
type OSLogEntryStoreCategory ¶
type OSLogEntryStoreCategory int
See: https://developer.apple.com/documentation/OSLog/OSLogEntry/StoreCategory-swift.enum
const ( // OSLogEntryStoreCategoryLongTerm1: The entry was tagged with a hint indicating the system should try to preserve it for approximately 1 day. OSLogEntryStoreCategoryLongTerm1 OSLogEntryStoreCategory = 4 // OSLogEntryStoreCategoryLongTerm14: The entry was tagged with a hint indicating the system should try to preserve it for approximately 14 days. OSLogEntryStoreCategoryLongTerm14 OSLogEntryStoreCategory = 7 // OSLogEntryStoreCategoryLongTerm3: The entry was tagged with a hint indicating the system should try to preserve it for approximately 3 days. OSLogEntryStoreCategoryLongTerm3 OSLogEntryStoreCategory = 5 // OSLogEntryStoreCategoryLongTerm30: The entry was tagged with a hint indicating the system should try to preserve it for approximately 30 days. OSLogEntryStoreCategoryLongTerm30 OSLogEntryStoreCategory = 8 // OSLogEntryStoreCategoryLongTerm7: The entry was tagged with a hint indicating the system should try to preserve it for approximately 7 days. OSLogEntryStoreCategoryLongTerm7 OSLogEntryStoreCategory = 6 // OSLogEntryStoreCategoryLongTermAuto: The entry was tagged with a hint indicating the system should try to preserve it based on the amount of space available. OSLogEntryStoreCategoryLongTermAuto OSLogEntryStoreCategory = 3 // OSLogEntryStoreCategoryMetadata: This entry was generated as information about the other entries or about the sequence of entries as a whole. OSLogEntryStoreCategoryMetadata OSLogEntryStoreCategory = 1 // OSLogEntryStoreCategoryShortTerm: This entry was not intended to be long-lived, and was captured in the ring buffer. OSLogEntryStoreCategoryShortTerm OSLogEntryStoreCategory = 2 // OSLogEntryStoreCategoryUndefined: This entry’s purpose is unknown. OSLogEntryStoreCategoryUndefined OSLogEntryStoreCategory = 0 )
func (OSLogEntryStoreCategory) String ¶
func (e OSLogEntryStoreCategory) String() string
type OSLogEntryWithPayload ¶
type OSLogEntryWithPayload interface {
objectivec.IObject
// The payload’s category.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/category
Category() string
// The payload’s components.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/components
Components() []OSLogMessageComponent
// The payload’s format string.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/formatString
FormatString() string
// The payload’s subsystem.
//
// See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/subsystem
Subsystem() string
}
A protocol defining subclasses that represent entries made using a handle and a format string.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload
type OSLogEntryWithPayloadObject ¶
type OSLogEntryWithPayloadObject struct {
objectivec.Object
}
OSLogEntryWithPayloadObject wraps an existing Objective-C object that conforms to the OSLogEntryWithPayload protocol.
func OSLogEntryWithPayloadObjectFromID ¶
func OSLogEntryWithPayloadObjectFromID(id objc.ID) OSLogEntryWithPayloadObject
OSLogEntryWithPayloadObjectFromID constructs a OSLogEntryWithPayloadObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (OSLogEntryWithPayloadObject) BaseObject ¶
func (o OSLogEntryWithPayloadObject) BaseObject() objectivec.Object
func (OSLogEntryWithPayloadObject) Category ¶
func (o OSLogEntryWithPayloadObject) Category() string
The payload’s category.
Discussion ¶
The category is derived from the `os_log_t` handle used.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/category
func (OSLogEntryWithPayloadObject) Components ¶
func (o OSLogEntryWithPayloadObject) Components() []OSLogMessageComponent
The payload’s components.
Discussion ¶
This property contains an array of OSLogMessageComponent objects from the composed message.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/components
func (OSLogEntryWithPayloadObject) FormatString ¶
func (o OSLogEntryWithPayloadObject) FormatString() string
The payload’s format string.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/formatString
func (OSLogEntryWithPayloadObject) Subsystem ¶
func (o OSLogEntryWithPayloadObject) Subsystem() string
The payload’s subsystem.
Discussion ¶
The category is derived from the `os_log_t` handle used.
See: https://developer.apple.com/documentation/OSLog/OSLogEntryWithPayload/subsystem
type OSLogEnumerator ¶
type OSLogEnumerator struct {
foundation.NSEnumerator
}
An enumerator that can access and list log entries.
See: https://developer.apple.com/documentation/OSLog/OSLogEnumerator
func NewOSLogEnumerator ¶
func NewOSLogEnumerator() OSLogEnumerator
NewOSLogEnumerator creates a new OSLogEnumerator instance.
func OSLogEnumeratorFromID ¶
func OSLogEnumeratorFromID(id objc.ID) OSLogEnumerator
OSLogEnumeratorFromID constructs a OSLogEnumerator from an objc.ID.
An enumerator that can access and list log entries.
func (OSLogEnumerator) Autorelease ¶
func (o OSLogEnumerator) Autorelease() OSLogEnumerator
Autorelease adds the receiver to the current autorelease pool.
func (OSLogEnumerator) Init ¶
func (o OSLogEnumerator) Init() OSLogEnumerator
Init initializes the instance.
type OSLogEnumeratorClass ¶
type OSLogEnumeratorClass struct {
// contains filtered or unexported fields
}
func GetOSLogEnumeratorClass ¶
func GetOSLogEnumeratorClass() OSLogEnumeratorClass
GetOSLogEnumeratorClass returns the class object for OSLogEnumerator.
func (OSLogEnumeratorClass) Alloc ¶
func (oc OSLogEnumeratorClass) Alloc() OSLogEnumerator
Alloc allocates memory for a new instance of the class.
func (OSLogEnumeratorClass) Class ¶
func (oc OSLogEnumeratorClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogEnumeratorOptions ¶
type OSLogEnumeratorOptions uint
See: https://developer.apple.com/documentation/OSLog/OSLogEnumerator/Options
const ( // OSLogEnumeratorReverse: Tells the framework to iterate backwards. OSLogEnumeratorReverse OSLogEnumeratorOptions = 0x1 )
func (OSLogEnumeratorOptions) String ¶
func (e OSLogEnumeratorOptions) String() string
type OSLogMessageComponent ¶
type OSLogMessageComponent struct {
objectivec.Object
}
The message arguments for a particular entry.
Overview ¶
There is one component for each placeholder in the formatString plus one component for any text after the last placeholder.
Reading the Argument ¶
- OSLogMessageComponent.Argument: The argument passed into the message component.
- OSLogMessageComponent.SetArgument
- OSLogMessageComponent.ArgumentCategory: The type of argument that corresponds to the placeholder.
Reading the Message Component ¶
- OSLogMessageComponent.FormatSubstring: The text immediately preceding a placeholder.
- OSLogMessageComponent.Placeholder: The placeholder text for the message component.
Accessing the Argument ¶
- OSLogMessageComponent.ArgumentDataValue: The argument formatted as a sequence of bytes.
- OSLogMessageComponent.ArgumentDoubleValue: The argument formatted as a double.
- OSLogMessageComponent.ArgumentInt64Value: The argument formatted as a signed 64-bit integer.
- OSLogMessageComponent.ArgumentNumberValue: The argument formatted as a number.
- OSLogMessageComponent.ArgumentStringValue: The argument formatted as a string.
- OSLogMessageComponent.ArgumentUInt64Value: The argument formatted as an unsigned 64-bit integer.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent
func NewOSLogMessageComponent ¶
func NewOSLogMessageComponent() OSLogMessageComponent
NewOSLogMessageComponent creates a new OSLogMessageComponent instance.
func OSLogMessageComponentFromID ¶
func OSLogMessageComponentFromID(id objc.ID) OSLogMessageComponent
OSLogMessageComponentFromID constructs a OSLogMessageComponent from an objc.ID.
The message arguments for a particular entry.
func (OSLogMessageComponent) Argument ¶
func (o OSLogMessageComponent) Argument() unsafe.Pointer
The argument passed into the message component.
See: https://developer.apple.com/documentation/oslog/oslogmessagecomponent/argument-swift.property
func (OSLogMessageComponent) ArgumentCategory ¶
func (o OSLogMessageComponent) ArgumentCategory() OSLogMessageComponentArgumentCategory
The type of argument that corresponds to the placeholder.
func (OSLogMessageComponent) ArgumentDataValue ¶
func (o OSLogMessageComponent) ArgumentDataValue() foundation.NSData
The argument formatted as a sequence of bytes.
Discussion ¶
The `argumentDataValue` property can be `nil` if the argument can’t be decoded. For example, redacted arguments and the last component can’t be decoded.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/argumentDataValue
func (OSLogMessageComponent) ArgumentDoubleValue ¶
func (o OSLogMessageComponent) ArgumentDoubleValue() float64
The argument formatted as a double.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/argumentDoubleValue
func (OSLogMessageComponent) ArgumentInt64Value ¶
func (o OSLogMessageComponent) ArgumentInt64Value() int64
The argument formatted as a signed 64-bit integer.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/argumentInt64Value
func (OSLogMessageComponent) ArgumentNumberValue ¶
func (o OSLogMessageComponent) ArgumentNumberValue() foundation.NSNumber
The argument formatted as a number.
Discussion ¶
The `argumentNumberValue` property can be `nil` if the argument can’t be decoded. For example, redacted arguments and the last component can’t be decoded.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/argumentNumberValue
func (OSLogMessageComponent) ArgumentStringValue ¶
func (o OSLogMessageComponent) ArgumentStringValue() string
The argument formatted as a string.
Discussion ¶
The `argumentStringValue` property can be `nil` if the argument can’t be decoded. For example, redacted arguments or the last component can’t be decoded.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/argumentStringValue
func (OSLogMessageComponent) ArgumentUInt64Value ¶
func (o OSLogMessageComponent) ArgumentUInt64Value() uint64
The argument formatted as an unsigned 64-bit integer.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/argumentUInt64Value
func (OSLogMessageComponent) Autorelease ¶
func (o OSLogMessageComponent) Autorelease() OSLogMessageComponent
Autorelease adds the receiver to the current autorelease pool.
func (OSLogMessageComponent) EncodeWithCoder ¶
func (o OSLogMessageComponent) EncodeWithCoder(coder foundation.INSCoder)
func (OSLogMessageComponent) FormatSubstring ¶
func (o OSLogMessageComponent) FormatSubstring() string
The text immediately preceding a placeholder.
Discussion ¶
The `formatSubstring` property can be an empty string if there is nothing between two placeholders, or if it is between the placeholder and the bounds of the string.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/formatSubstring
func (OSLogMessageComponent) Init ¶
func (o OSLogMessageComponent) Init() OSLogMessageComponent
Init initializes the instance.
func (OSLogMessageComponent) Placeholder ¶
func (o OSLogMessageComponent) Placeholder() string
The placeholder text for the message component.
Discussion ¶
The `placeholder` property holds an empty value when it is the last component.
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/placeholder
func (OSLogMessageComponent) SetArgument ¶
func (o OSLogMessageComponent) SetArgument(value unsafe.Pointer)
type OSLogMessageComponentArgumentCategory ¶
type OSLogMessageComponentArgumentCategory int
See: https://developer.apple.com/documentation/OSLog/OSLogMessageComponent/ArgumentCategory-swift.enum
const ( // OSLogMessageComponentArgumentCategoryData: The argument is an NSData object. OSLogMessageComponentArgumentCategoryData OSLogMessageComponentArgumentCategory = 1 // OSLogMessageComponentArgumentCategoryDouble: The argument is a double. OSLogMessageComponentArgumentCategoryDouble OSLogMessageComponentArgumentCategory = 2 // OSLogMessageComponentArgumentCategoryInt64: The argument is a 64-bit signed integer. OSLogMessageComponentArgumentCategoryInt64 OSLogMessageComponentArgumentCategory = 3 // OSLogMessageComponentArgumentCategoryString: The argument is a string. OSLogMessageComponentArgumentCategoryString OSLogMessageComponentArgumentCategory = 4 // OSLogMessageComponentArgumentCategoryUInt64: The argument is a 64-bit unsigned integer. OSLogMessageComponentArgumentCategoryUInt64 OSLogMessageComponentArgumentCategory = 5 // OSLogMessageComponentArgumentCategoryUndefined: The argument’s type is not defined. OSLogMessageComponentArgumentCategoryUndefined OSLogMessageComponentArgumentCategory = 0 )
func (OSLogMessageComponentArgumentCategory) String ¶
func (e OSLogMessageComponentArgumentCategory) String() string
type OSLogMessageComponentClass ¶
type OSLogMessageComponentClass struct {
// contains filtered or unexported fields
}
func GetOSLogMessageComponentClass ¶
func GetOSLogMessageComponentClass() OSLogMessageComponentClass
GetOSLogMessageComponentClass returns the class object for OSLogMessageComponent.
func (OSLogMessageComponentClass) Alloc ¶
func (oc OSLogMessageComponentClass) Alloc() OSLogMessageComponent
Alloc allocates memory for a new instance of the class.
func (OSLogMessageComponentClass) Class ¶
func (oc OSLogMessageComponentClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogPosition ¶
type OSLogPosition struct {
objectivec.Object
}
A representation of a point in a sequence of entries in the unified logging system.
Overview ¶
Generate positions with OSLogStore instance methods and use them to view entries from a particular starting point.
See: https://developer.apple.com/documentation/OSLog/OSLogPosition
func NewOSLogPosition ¶
func NewOSLogPosition() OSLogPosition
NewOSLogPosition creates a new OSLogPosition instance.
func OSLogPositionFromID ¶
func OSLogPositionFromID(id objc.ID) OSLogPosition
OSLogPositionFromID constructs a OSLogPosition from an objc.ID.
A representation of a point in a sequence of entries in the unified logging system.
func (OSLogPosition) Autorelease ¶
func (o OSLogPosition) Autorelease() OSLogPosition
Autorelease adds the receiver to the current autorelease pool.
func (OSLogPosition) Init ¶
func (o OSLogPosition) Init() OSLogPosition
Init initializes the instance.
type OSLogPositionClass ¶
type OSLogPositionClass struct {
// contains filtered or unexported fields
}
func GetOSLogPositionClass ¶
func GetOSLogPositionClass() OSLogPositionClass
GetOSLogPositionClass returns the class object for OSLogPosition.
func (OSLogPositionClass) Alloc ¶
func (oc OSLogPositionClass) Alloc() OSLogPosition
Alloc allocates memory for a new instance of the class.
func (OSLogPositionClass) Class ¶
func (oc OSLogPositionClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSLogStore ¶
type OSLogStore struct {
objectivec.Object
}
A set of entries from the unified logging system.
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:) function to retrieve a filtered array of log entries.
In Objective-C, use instances of this class to create OSLogEnumerator objects. One store can support multiple OSLogEnumerator instances concurrently.
Accessing Position ¶
- OSLogStore.PositionWithDate: Returns a position representing the time specified.
- OSLogStore.PositionWithTimeIntervalSinceEnd: Returns a position representing time since the end of the time range that the entries span.
- OSLogStore.PositionWithTimeIntervalSinceLatestBoot: Returns a position representing time since the last boot in the series of entries.
See: https://developer.apple.com/documentation/OSLog/OSLogStore
func NewOSLogStore ¶
func NewOSLogStore() OSLogStore
NewOSLogStore creates a new OSLogStore instance.
func NewOSLogStoreWithScopeError ¶
func NewOSLogStoreWithScopeError(scope OSLogStoreScope) (OSLogStore, error)
See: https://developer.apple.com/documentation/OSLog/OSLogStore/init(scope:)
func NewOSLogStoreWithURLError ¶
func NewOSLogStoreWithURLError(url foundation.NSURL) (OSLogStore, error)
Creates a log store based on a log archive.
See: https://developer.apple.com/documentation/OSLog/OSLogStore/init(url:)
func OSLogStoreFromID ¶
func OSLogStoreFromID(id objc.ID) OSLogStore
OSLogStoreFromID constructs a OSLogStore from an objc.ID.
A set of entries from the unified logging system.
func (OSLogStore) Autorelease ¶
func (o OSLogStore) Autorelease() OSLogStore
Autorelease adds the receiver to the current autorelease pool.
func (OSLogStore) EntriesEnumeratorAndReturnError ¶
func (o OSLogStore) EntriesEnumeratorAndReturnError() (IOSLogEnumerator, error)
Returns a log enumerator with default options for viewing the entries.
Discussion ¶
This method returns all of the entries from earliest to latest. If the enumerator can’t be set up, `entriesEnumeratorAndReturnError` returns `nil` and sets the error parameter to an error object describing the problem.
See: https://developer.apple.com/documentation/OSLog/OSLogStore/entriesEnumeratorAndReturnError:
func (OSLogStore) EntriesEnumeratorWithOptionsPositionPredicateError ¶
func (o OSLogStore) EntriesEnumeratorWithOptionsPositionPredicateError(options OSLogEnumeratorOptions, position IOSLogPosition, predicate foundation.NSPredicate) (IOSLogEnumerator, error)
Returns a log enumerator based on an underlying store.
Discussion ¶
The returned object represents the sequence of entries for the OSLogStore. Use the additional parameters to control which entries are returned and their order.
func (OSLogStore) PositionWithDate ¶
func (o OSLogStore) PositionWithDate(date foundation.NSDate) IOSLogPosition
Returns a position representing the time specified.
Discussion ¶
If there are multiple occurrences of the same time, the method returns the earliest occurrence.
See: https://developer.apple.com/documentation/OSLog/OSLogStore/position(date:)
func (OSLogStore) PositionWithTimeIntervalSinceEnd ¶
func (o OSLogStore) PositionWithTimeIntervalSinceEnd(seconds foundation.NSTimeInterval) IOSLogPosition
Returns a position representing time since the end of the time range that the entries span.
See: https://developer.apple.com/documentation/OSLog/OSLogStore/position(timeIntervalSinceEnd:)
func (OSLogStore) PositionWithTimeIntervalSinceLatestBoot ¶
func (o OSLogStore) PositionWithTimeIntervalSinceLatestBoot(seconds foundation.NSTimeInterval) IOSLogPosition
Returns a position representing time since the last boot in the series of entries.
See: https://developer.apple.com/documentation/OSLog/OSLogStore/position(timeIntervalSinceLatestBoot:)
type OSLogStoreClass ¶
type OSLogStoreClass struct {
// contains filtered or unexported fields
}
func GetOSLogStoreClass ¶
func GetOSLogStoreClass() OSLogStoreClass
GetOSLogStoreClass returns the class object for OSLogStore.
func (OSLogStoreClass) Alloc ¶
func (oc OSLogStoreClass) Alloc() OSLogStore
Alloc allocates memory for a new instance of the class.
func (OSLogStoreClass) Class ¶
func (oc OSLogStoreClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
func (OSLogStoreClass) LocalStoreAndReturnError ¶
func (_OSLogStoreClass OSLogStoreClass) LocalStoreAndReturnError() (OSLogStore, error)
Creates a log store representing the Mac’s local store.
Discussion ¶
Gaining access to the local unified logging system requires permission from the system. The caller must be run by an admin account and have the `com.AppleXCUIElementTypeLoggingXCUIElementTypeLocal()-store` entitlement.
See: https://developer.apple.com/documentation/OSLog/OSLogStore/local()
type OSLogStoreScope ¶
type OSLogStoreScope int
See: https://developer.apple.com/documentation/OSLog/OSLogStore/Scope
const ( OSLogStoreCurrentProcessIdentifier OSLogStoreScope = 1 OSLogStoreSystem OSLogStoreScope = 0 )
func (OSLogStoreScope) String ¶
func (e OSLogStoreScope) String() string
Source Files
¶
- doc.gen.go
- enums.gen.go
- functions.gen.go
- generate.go
- os_log_entry.gen.go
- os_log_entry_activity.gen.go
- os_log_entry_boundary.gen.go
- os_log_entry_from_process_protocol.gen.go
- os_log_entry_log.gen.go
- os_log_entry_signpost.gen.go
- os_log_entry_with_payload_protocol.gen.go
- os_log_enumerator.gen.go
- os_log_message_component.gen.go
- os_log_position.gen.go
- os_log_store.gen.go
- types.gen.go
- undefined_types.gen.go