Skip to main content

create_script_log_layer

Macro create_script_log_layer 

Source
macro_rules! create_script_log_layer {
    ($enabled:expr, $max_script_log_message_length:expr) => { ... };
}
Expand description

Creates a script logging layer for capturing script execution logs in memory.

This macro conditionally creates a script logging layer that captures log entries in memory for later retrieval. When enabled, it creates a [ScriptLogHandle] that implements the tracing [Layer] trait and stores log entries in an in-memory buffer.

§Arguments

  • $enabled - Boolean expression indicating whether script logging should be enabled

§Returns

  • Some(ScriptLogHandle) - Configured script log layer if enabled
  • None - If script logging is disabled