pub fn showcase_this() -> Result<()>Expand description
Showcase the current active log file
This is a convenience function that showcases the log file that was specified in the Deloxide::with_log() initialization. It’s useful when you don’t want to keep track of the log file path manually.
§Returns
A Result that is Ok if the showcase succeeded, or an error if it failed.
IMPORTANT: This function ensures all pending log entries are flushed to disk before showcasing to guarantee the log file is complete.
§Errors
Returns an error if:
- No active log file exists
- Failed to flush pending log entries
- Failed to process the log file
- Failed to open the browser
§Example
use deloxide::{Deloxide, showcase_this};
// Initialize with logging enabled
Deloxide::new()
.with_log("deadlock_log.json")
.start()
.expect("Failed to initialize detector");
// Later, after a deadlock has been detected
showcase_this().expect("Failed to showcase current log");