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:
+2
-2
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user