IStructuredLogControl2
- class omni.structuredlog.IStructuredLogControl2
Bases:
_IStructuredLogControl2
Interface for the second version of the IStructuredLogControl interface. This interface exposes more functions to control the behavior of the structured logging system. This object can be retrieved directly or by casting the main IStructuredLog interface to this type using ``omni::core::ObjectPtr::as<>()``.
Methods
__init__
(*args, **kwargs)Overloaded function.
emit_process_lifetime_exit_event
(self, reason)Immediately emits the process lifetime exit event for the process.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: omni.structuredlog._structuredlog.IStructuredLogControl2, arg0: omni.core._core.IObject) -> None
__init__(self: omni.structuredlog._structuredlog.IStructuredLogControl2) -> None
- emit_process_lifetime_exit_event(self: omni.structuredlog._structuredlog.IStructuredLogControl2, reason: str) None
Immediately emits the process lifetime exit event for the process.
- @param[in] reason The reason why the exit event is being emitted. This can be any text
that gives and indication for why an exit is occurring. This may not be ``nullptr`` and should not be an empty string.
@returns No return value.
- @remarks This forces the process lifetime exit event to be emitted early for the process.
If this is called, it will pre-empt the normal attempt to emit it automatically when ``omni.structuredlog.plugin`` unloads. This can be used to provide a different reason message for the exit event or to explicitly emit the event in situations where ``omni.structuredlog.plugin`` cannot be properly unloaded (ie: another system leaks or hangs onto a reference to one of the objects from the library).
- @note This should only ever be called when a process shutdown is iminent and cannot be
cancelled or avoided. If this is emitted earlier in the process than exit time, the analysis of the process’ duration could be incorrect.
- @note Calling this will flush the structuredlog queue to ensure the event is flushed to disk
before the process exits.