Creates a custom log object, to be passed to logging functions for sending messages to the logging system.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
An identifier string, in reverse DNS notation, representing the subsystem that’s performing logging. For example,
com. The subsystem is used for categorization and filtering of related log messages, as well as for grouping related logging settings.
.your _company .your _subsystem _name
A category within the specified subsystem. The category is used for categorization and filtering of related log messages, as well as for grouping related logging settings within the subsystem’s settings. A category’s logging settings override those of the parent subsystem.
A value of type
os, which can be passed to other logging functions to perform logging and to determine whether a specific level of logging is enabled. A value is always returned and should be released when no longer needed.
Generally, use the
OS constant to perform logging using the system’s behavior. Create a custom log object only when you want to tag messages with a specific subsystem and category for the purpose of filtering, or to customize the logging behavior of your subsystem with a profile for debugging purposes. This function only needs to be called once to initialize a custom log object. It doesn’t need to be called again when changing logging settings. The system automatically detects changes to logging settings.