Module action_logger

Module action_logger 

Source
Expand description

Action logging with pattern-based filtering and in-memory storage

Provides configurable action logging using glob patterns to include/exclude specific actions from logs. Supports both tracing output and in-memory ring buffer storage for display in debug overlays.

§Example

use tui_dispatch_core::debug::{ActionLoggerConfig, ActionLoggerMiddleware, ActionLogConfig};

// Log all actions except Tick and Render (tracing only)
let config = ActionLoggerConfig::default();
let middleware = ActionLoggerMiddleware::new(config);

// Log with in-memory storage for debug overlay display
let config = ActionLogConfig::default();
let middleware = ActionLoggerMiddleware::with_log(config);

// Access the action log
if let Some(log) = middleware.log() {
    for entry in log.recent(10) {
        println!("{}: {}", entry.elapsed, entry.params);
    }
}

Structs§

ActionLog
In-memory ring buffer for storing recent actions
ActionLogConfig
Configuration for the action log ring buffer
ActionLogEntry
An entry in the action log
ActionLoggerConfig
Configuration for action logging with glob pattern filtering.
ActionLoggerMiddleware
Middleware that logs actions with configurable pattern filtering.

Functions§

glob_match
Simple glob pattern matching supporting * and ?.