Skip to main content

Module handler

Module handler 

Source
Expand description

Script log handler implementation for capturing and storing Rhai script logs.

This module provides the core functionality for capturing log events from Rhai scripts and storing them in memory for later retrieval. It implements a tracing layer that filters for script-specific log events and converts them into structured log entries.

Structs§

RhaiContextGuard
Resource Acquisition Is Initialization (RAII) guard for automatic Rhai context cleanup.
ScriptLogHandle
Handle for accessing and managing script logs captured during execution.

Statics§

SCRIPT_HANDLE
Global singleton instance of the script log handle.

Functions§

get_current_rhai_context
Retrieves the current Rhai execution context from the top of the stack.
get_script_handle
Retrieves the global script log handle instance.
pop_current_rhai_context
Pops and returns the current Rhai execution context from the stack.
push_rhai_context_with_guard
Pushes a new Rhai execution context onto the stack and returns a guard for automatic cleanup.