MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / create_log_dump

Method create_log_dump

crates/chat-cli/src/cli/chat/cli/logdump.rs:75–90  ·  view source on GitHub ↗
(&self, zip_path: &Path, logs_dir: PathBuf)

Source from the content-addressed store, hash-verified

73 }
74
75 async fn create_log_dump(&self, zip_path: &Path, logs_dir: PathBuf) -> Result<usize, Box<dyn std::error::Error>> {
76 let file = std::fs::File::create(zip_path)?;
77 let mut zip = ZipWriter::new(file);
78 let mut log_count = 0;
79
80 // Collect qchat.log
81 log_count += Self::collect_qchat_log(&mut zip, &logs_dir)?;
82
83 // Collect mcp.log if --mcp flag is set
84 if self.mcp {
85 log_count += Self::collect_mcp_log(&mut zip, &logs_dir)?;
86 }
87
88 zip.finish()?;
89 Ok(log_count)
90 }
91
92 fn collect_qchat_log(
93 zip: &mut ZipWriter<std::fs::File>,

Calls 1

finishMethod · 0.45