{"record":{"id":"ca57ab0b630992c2","repo":"zed-industries/zed","slug":"no-log-file-path-configured","errorCode":null,"errorMessage":"No log file path configured","messagePattern":"No log file path configured","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zlog/src/sink.rs","lineNumber":270,"sourceCode":"        if self.ansi {\n            f.write_str(ANSI_RESET)?;\n        }\n        f.write_char(']')?;\n        Ok(())\n    }\n}\n\nfn rotate_log_file<PathRef>(\n    path: Option<PathRef>,\n    path_rotate: Option<PathRef>,\n) -> std::io::Result<Option<fs::File>>\nwhere\n    PathRef: AsRef<std::path::Path>,\n{\n    let path = path.as_ref().map(PathRef::as_ref);\n    let rotation_error = match (path, path_rotate) {\n        (Some(_), None) => Some(anyhow::anyhow!(\"No rotation log file path configured\")),\n        (None, _) => Some(anyhow::anyhow!(\"No log file path configured\")),\n        (Some(path), Some(path_rotate)) => fs::copy(path, path_rotate)\n            .err()\n            .map(|err| anyhow::anyhow!(err)),\n    };\n    if let Some(err) = rotation_error {\n        eprintln!(\"Log file rotation failed. Truncating log file anyways: {err}\",);\n    }\n    path.map(|path| {\n        fs::OpenOptions::new()\n            .create(true)\n            .write(true)\n            .truncate(true)\n            .open(path)\n    })\n    .transpose()\n}\n\n#[cfg(test)]","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/zlog/src/sink.rs#L252-L288","documentation":"Returned by rotate_log_file when path_rotate is configured (rotation requested) but the main log file path is None. Rotation requires a primary log file to rotate; with no base path configured the log sink setup fails with this sentinel.","triggerScenarios":"Thrown at crates/zlog/src/sink.rs:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a log file path before enabling file logging","Treat missing path as 'no file sink' and continue with other sinks"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}