Skip to content

Commit 439ede5

Browse files
committed
chore: Replace print_startup_string with structured event
1 parent df564df commit 439ede5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

rust/operator-binary/src/main.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{os::unix::prelude::FileTypeExt, path::PathBuf};
22

3-
use clap::{crate_description, crate_version, Parser};
3+
use clap::Parser;
44
use csi_grpc::v1::{
55
controller_server::ControllerServer, identity_server::IdentityServer, node_server::NodeServer,
66
};
@@ -49,7 +49,7 @@ struct ListenerOperatorRun {
4949
pub cluster_info_opts: KubernetesClusterInfoOpts,
5050
}
5151

52-
#[derive(clap::Parser, strum::AsRefStr)]
52+
#[derive(Debug, clap::Parser, strum::AsRefStr, strum::Display)]
5353
enum RunMode {
5454
Controller,
5555
Node {
@@ -82,13 +82,15 @@ async fn main() -> anyhow::Result<()> {
8282
"listener-operator",
8383
tracing_target,
8484
);
85-
stackable_operator::utils::print_startup_string(
86-
&format!("{} ({})", crate_description!(), mode.as_ref()),
87-
crate_version!(),
88-
built_info::GIT_VERSION,
89-
built_info::TARGET,
90-
built_info::BUILT_TIME_UTC,
91-
built_info::RUSTC_VERSION,
85+
tracing::info!(
86+
run_mode = %mode,
87+
built_info.pkg_version = built_info::PKG_VERSION,
88+
built_info.git_version = built_info::GIT_VERSION,
89+
built_info.target = built_info::TARGET,
90+
built_info.built_time_utc = built_info::BUILT_TIME_UTC,
91+
built_info.rustc_version = built_info::RUSTC_VERSION,
92+
"Starting {description}",
93+
description = built_info::PKG_DESCRIPTION
9294
);
9395
let client = stackable_operator::client::initialize_operator(
9496
Some(OPERATOR_KEY.to_string()),

0 commit comments

Comments
 (0)