changelog: report through the log instead of printing to stdout

generate_entry's status messages become log lines, and the unmet
build-dependency diagnostics travel inside the UnmetBuildDependencies
error (its Display carries the full report) instead of being printed
to stderr by the library: the caller renders both like any other
outcome.
This commit is contained in:
2026-09-18 20:44:05 +02:00
parent 54cb04ba27
commit 0421a91e01
3 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ pub fn generate_entry(
// Parse existing changelog to get current (old) version
let (package, old_version, series) = parse_changelog_header(&changelog_path)?;
println!("Found package: {}, version: {}", package, old_version);
log::info!("Found package: {}, version: {}", package, old_version);
// Open git repo, and find commits since last version tag
let repo_path = if let Some(path) = cwd {
@@ -56,7 +56,7 @@ pub fn generate_entry(
prepend_to_file(&changelog_path, &new_entry)?;
println!("Added new changelog entry to {}", changelog_path.display());
log::info!("Added new changelog entry to {}", changelog_path.display());
Ok(())
}