Macro

os_log_with_type

Sends a message at a specific logging level, such as default, info, debug, error, or fault, to the logging system.

Declaration

#define os_log_with_type(log, type, format, ...)

Parameters

log

The OS_LOG_DEFAULT constant or a custom log object previously created by the os_log_create function.

type

A log type constant, such as OS_LOG_TYPE_DEFAULT, OS_LOG_TYPE_INFO, OS_LOG_TYPE_DEBUG, OS_LOG_TYPE_ERROR, or OS_LOG_TYPE_FAULT, indicating the level of logging to perform.

format

A constant string or format string that produces a human-readable log message. See Formatting Log Messages.

Discussion

Calling this function doesn’t ensure that a message is logged. Logging always occurs in accordance with the behavior settings of the provided log object and type. Note that lengthy log messages may be truncated when stored by the logging system.

See Also

Generating Log Messages

os_log

Sends a default-level message to the logging system.

os_log_info

Sends an info-level message to the logging system.

os_log_debug

Sends a debug-level message to the logging system.

os_log_error

Sends an error-level message to the logging system.

os_log_fault

Sends a fault-level message to the logging system.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software