I'm working on a logger that is based on Unified Logging System that supports activities/scopes and I've found that a message with fault
level type is not captured by any of my activities:
var os_state = os_activity_scope_state_s()
let os_activity = _os_activity_create(dso, strdup("My Activity"), OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT)
os_activity_scope_enter(os_activity, &os_state)
os_log("fault message", type: .fault) // "My Activity" don't have one
os_activity_scope_leave(&os_state)
Later I found the activity with my message:
16:04:52.978940+0300 libsystem_trace.dylib 0 Activity for state dumps
So the system creates a special activity for that kind of messages (Tested on Mac/iOS).
But from the documentation (https://developer.apple.com/documentation/os/oslogtype/2320725-fault):
If an activity object exists, logging at this level captures information for the entire process chain.
And it's the same as for the error
log level which is captured OK for custom activities.
Is a known issue or expected behaviour? I can't find any info about.