os_log configuration plist?

I see in os/signpost.h a mysterious reference to configuration plists for os_logs that would allow me to specify the matching scope for signpost intervals.



#pragma mark - Interval Matching Scope

/*!
* The matching scope for signpost intervals logged with a given os_log_t is
* specified in that log handles's configuration plist using the
* 'Signpost-Scope' key and defaults to process-wide scope (i.e. 'Process'
* value) if unspecified.
*
* Signpost interval begin and end matching can have 3 different scopes:
*
* - Thread-wide: The search scope for matching begins and ends is restricted to
*   single threads. To set this as the search scope for an os_log_t, set
*   'Thread' as the string value for the 'Signpost-Scope' key in the
*   os_log_t's configuration plist.
*
* - Process-wide (Default value): The search scope for matching begins and ends
*   is restricted to a single process. (i.e. no cross-process intervals)
*   To set this as the search scope for an os_log_t, set
*   'Process' as the string value for the 'Signpost-Scope' key in the
*   os_log_t's configuration plist or do not specify any 'Signpost-Scope' key-
*   value pair.
*
* - System-wide: The search scope for matching begins and ends is not
*   restricted. (i.e. cross-process intervals are possible)
*   To set this as the search scope for an os_log_t, set
*   'System' as the string value for the 'Signpost-Scope' key in the
*   os_log_t's configuration plist.
*
*/

Is there any documentation anywhere on how to do this/set this up?

Replies

https://developer.apple.com/documentation/os/logging?language=objc


But I don't see the signpost specific bits. I think you can infer it from that document plus the header.

Thanks Chad, but isn't this something that the implementor would know as opposed to someone who is configuring logging on their machine? I don't see why this isn't an option at the log creation point as opposed to the plist.

Yes, conceptually this is something the implementor would know rather than the person configuring logging. No arguments there. It gets sticky because these logging handles are not private to a process, so there are reasons to want the configuration in a central place. For example, if we defined one that everyone could log to, how could I be sure they'd all agree and create the logging handle the same way?