MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / open_log_file

Function open_log_file

src/telemetry.rs:235–240  ·  view source on GitHub ↗

Open a log file with proper options for append-only writing. Creates parent directories if they don't exist.

(path: &PathBuf)

Source from the content-addressed store, hash-verified

233///
234/// Creates parent directories if they don't exist.
235fn open_log_file(path: &PathBuf) -> io::Result<File> {
236 if let Some(parent) = path.parent() {
237 fs::create_dir_all(parent)?;
238 }
239 OpenOptions::new().create(true).append(true).open(path)
240}
241
242/// Write a single log entry to the file, followed by a flush.
243///

Callers 1

spawnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected