Skip to content

Commit 1580d10

Browse files
committed
loginfo version
1 parent 457555a commit 1580d10

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

crates/cli/src/commands/create_dkg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ async fn run_create_dkg(mut args: CreateDkgArgs) -> Result<(), CreateDkgError> {
303303

304304
validate_withdrawal_addrs(&withdrawal_addrs, &args.network)?;
305305

306-
info!("Pluto create DKG starting");
306+
pluto_core::version::log_info("Pluto create DKG starting");
307307

308308
let def_path = args.output_dir.join("cluster-definition.json");
309309
if def_path.exists() {

crates/core/src/version.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ pub fn git_commit() -> (String, String) {
6161
(hash, timestamp)
6262
}
6363

64+
/// Logs pluto version information along with the provided message.
65+
pub fn log_info(msg: &str) {
66+
let (git_hash, git_timestamp) = git_commit();
67+
tracing::info!(
68+
version = %*VERSION,
69+
git_commit_hash = git_hash,
70+
git_commit_time = git_timestamp,
71+
"{msg}"
72+
);
73+
}
74+
6475
/// Dependency list from build info in `name v{version}` format.
6576
pub fn dependencies() -> Vec<String> {
6677
let mut deps: Vec<String> = built_info::DEPENDENCIES

0 commit comments

Comments
 (0)