pub struct DebugLog { /* private fields */ }Expand description
Debug logger that writes to file and optionally prints to console
Implementations§
Source§impl DebugLog
impl DebugLog
Sourcepub fn new(verbose: bool) -> Self
pub fn new(verbose: bool) -> Self
Create a new debug logger Writes to ~/.matrix/debug.log if possible
Sourcepub fn compression(
&self,
original_tokens: u32,
compressed_tokens: u32,
ratio: f32,
)
pub fn compression( &self, original_tokens: u32, compressed_tokens: u32, ratio: f32, )
Log compression trigger
Sourcepub fn memory_save(&self, entries: usize, summary_len: usize)
pub fn memory_save(&self, entries: usize, summary_len: usize)
Log memory save
Sourcepub fn keywords_extracted(&self, keywords: &[String], source: &str)
pub fn keywords_extracted(&self, keywords: &[String], source: &str)
Log keyword extraction
Sourcepub fn tool_call(&self, tool: &str, input_preview: &str, result_preview: &str)
pub fn tool_call(&self, tool: &str, input_preview: &str, result_preview: &str)
Log tool execution
Sourcepub fn session_save(&self, message_count: usize, total_tokens: u64)
pub fn session_save(&self, message_count: usize, total_tokens: u64)
Log session save
Sourcepub fn api_request(&self, url: &str, body: &str)
pub fn api_request(&self, url: &str, body: &str)
Log API request body (for debug)
Sourcepub fn api_response(&self, status: u16, body: &str)
pub fn api_response(&self, status: u16, body: &str)
Log API response (for debug)
Sourcepub fn stream_chunk(&self, chunk_type: &str, content: &str)
pub fn stream_chunk(&self, chunk_type: &str, content: &str)
Log streaming chunk (for debug, limited)
Sourcepub fn memory_ai_keywords(
&self,
model: &str,
keywords_count: usize,
source_len: usize,
used_ai: bool,
)
pub fn memory_ai_keywords( &self, model: &str, keywords_count: usize, source_len: usize, used_ai: bool, )
Log AI memory extraction (keyword extraction with fast model)
Sourcepub fn memory_ai_detection(
&self,
model: &str,
entries_count: usize,
text_len: usize,
used_ai: bool,
)
pub fn memory_ai_detection( &self, model: &str, entries_count: usize, text_len: usize, used_ai: bool, )
Log AI memory detection (memory extraction from response)
Sourcepub fn stats(&self) -> DebugStats
pub fn stats(&self) -> DebugStats
Get statistics
Auto Trait Implementations§
impl !Freeze for DebugLog
impl RefUnwindSafe for DebugLog
impl Send for DebugLog
impl Sync for DebugLog
impl Unpin for DebugLog
impl UnsafeUnpin for DebugLog
impl UnwindSafe for DebugLog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more