logger: use official zst extension (not zstd)

This commit is contained in:
Mikaël Cluseau
2025-07-21 09:49:02 +02:00
parent 7d02d8f932
commit 852738bec3
2 changed files with 3 additions and 3 deletions

View File

@ -243,7 +243,7 @@ async fn compress(path: impl AsRef<Path>) {
.await .await
.map_err(|e| format_err!("open {path_str} failed: {e}"))?; .map_err(|e| format_err!("open {path_str} failed: {e}"))?;
let out_path = path.with_extension("zstd"); let out_path = path.with_extension("zst");
let out = (File::create(&out_path).await) // create output let out = (File::create(&out_path).await) // create output
.map_err(|e| format_err!("create {} failed: {e}", out_path.to_string_lossy()))?; .map_err(|e| format_err!("create {} failed: {e}", out_path.to_string_lossy()))?;
@ -286,7 +286,7 @@ pub async fn log_files(log_path: &str, log_name: &str) -> std::io::Result<Vec<Lo
}; };
let (name, compressed) = file_name let (name, compressed) = file_name
.strip_suffix(".zstd") .strip_suffix(".zst")
.map_or((file_name, false), |s| (s, true)); .map_or((file_name, false), |s| (s, true));
let Some(name) = name.strip_suffix(".log") else { let Some(name) = name.strip_suffix(".log") else {

View File

@ -3,7 +3,7 @@ set -ex
dkl=target/debug/dkl dkl=target/debug/dkl
test=${1:-dynlay} test=${1:-logger}
export RUST_LOG=debug,rsmount=info export RUST_LOG=debug,rsmount=info