Logger

Trait Logger 

Source
pub trait Logger {
    // Required methods
    fn log(&mut self, message: &str, args: &[&str]);
    fn toggle_log_view(&mut self);
    fn get_log_directory(&self) -> PathBuf;
    fn get_log_file_path(&self) -> PathBuf;
    fn write_log_to_file(&self, message: &str) -> Result<()>;
}
Expand description

Logger trait for writing logs to a file and displaying them in the TUI

Required Methods§

Source

fn log(&mut self, message: &str, args: &[&str])

Log a message with optional formatting arguments

Source

fn toggle_log_view(&mut self)

Toggle between showing logs and normal output

Source

fn get_log_directory(&self) -> PathBuf

Get the log directory path

Source

fn get_log_file_path(&self) -> PathBuf

Get the log file path for the current session

Source

fn write_log_to_file(&self, message: &str) -> Result<()>

Write a log message to file

Implementors§