Logging levels supported by the system.


struct OSLogType


A log type controls the conditions under which a message should be logged. To send a message at a specific level to the logging system, pass the corresponding log type constant to the os_log_with_type function or call the appropriate os_log function, such as os_log, os_log_info, os_log_debug, os_log_error, or os_log_fault, which automatically sends messages at the appropriate level.


Type Properties

static let `default`: OSLogType

The default log level.

static let info: OSLogType

The info log level.

static let debug: OSLogType

The debug log level.

static let error: OSLogType

The error log level.

static let fault: OSLogType

The fault log level.

Instance Properties


See Also

Creating a Custom Log Object

class OSLog

A custom log object that can be passed to logging functions in order to send messages to the logging system.

init(subsystem: String, category: String)

Creates a custom log object, to be passed to logging functions for sending messages to the logging system.