zed-industries/zed · error
No rotation log file path configured
Error message
No rotation log file path configured
What it means
Log rotation was requested (a log file path is set) but no rotation file path was configured alongside it, so rotate_log_file cannot build the rotation target. Configuration is incomplete rather than the environment failing.
Source
Thrown at crates/zlog/src/sink.rs:269
}
if self.ansi {
f.write_str(ANSI_RESET)?;
}
f.write_char(']')?;
Ok(())
}
}
fn rotate_log_file<PathRef>(
path: Option<PathRef>,
path_rotate: Option<PathRef>,
) -> std::io::Result<Option<fs::File>>
where
PathRef: AsRef<std::path::Path>,
{
let path = path.as_ref().map(PathRef::as_ref);
let rotation_error = match (path, path_rotate) {
(Some(_), None) => Some(anyhow::anyhow!("No rotation log file path configured")),
(None, _) => Some(anyhow::anyhow!("No log file path configured")),
(Some(path), Some(path_rotate)) => fs::copy(path, path_rotate)
.err()
.map(|err| anyhow::anyhow!(err)),
};
if let Some(err) = rotation_error {
eprintln!("Log file rotation failed. Truncating log file anyways: {err}",);
}
path.map(|path| {
fs::OpenOptions::new()
.create(true)
.write(true)
.truncate(true)
.open(path)
})
.transpose()
}
View on GitHub (pinned to f4178619ac)
Solutions
- Configure the rotation log file path together with the primary log file path
- Skip rotation (log to the single file) when no rotation path is provided
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/zlog/src/sink.rs:269 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/c2aad290151d3584.
Report an issue: GitHub.