Open (or create) the agent.log file for a task in append mode. Creates the output directory if it doesn't exist.
(&self, task_id: &str)
| 123 | /// |
| 124 | /// Creates the output directory if it doesn't exist. |
| 125 | pub fn open_agent_log(&self, task_id: &str) -> Result<std::fs::File, std::io::Error> { |
| 126 | let output_dir = self.task_dir(task_id).join("output"); |
| 127 | std::fs::create_dir_all(&output_dir)?; |
| 128 | std::fs::OpenOptions::new() |
| 129 | .create(true) |
| 130 | .append(true) |
| 131 | .open(output_dir.join("agent.log")) |
| 132 | } |
| 133 | |
| 134 | /// Get the directory for per-proxy configuration files (e.g., squid.conf) |
| 135 | pub fn proxy_config_dir(&self, fingerprint: &str) -> PathBuf { |
no test coverage detected