Skip to content

Commit c264ac6

Browse files
committed
chore: Replace print_startup_string with structured event
1 parent 283938b commit c264ac6

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

rust/operator-binary/src/main.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::sync::Arc;
22

3-
use clap::{crate_description, crate_version, Parser};
3+
use clap::Parser;
44
use crd::{v1alpha1, ZookeeperCluster, ZookeeperZnode, APP_NAME, OPERATOR_NAME};
55
use futures::{pin_mut, StreamExt};
66
use stackable_operator::{
@@ -37,7 +37,6 @@ mod znode_controller;
3737

3838
mod built_info {
3939
include!(concat!(env!("OUT_DIR"), "/built.rs"));
40-
pub const TARGET_PLATFORM: Option<&str> = option_env!("TARGET");
4140
pub const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
4241
}
4342

@@ -54,9 +53,9 @@ async fn main() -> anyhow::Result<()> {
5453
match opts.cmd {
5554
Command::Crd => {
5655
ZookeeperCluster::merged_crd(ZookeeperCluster::V1Alpha1)?
57-
.print_yaml_schema(built_info::CARGO_PKG_VERSION, SerializeOptions::default())?;
56+
.print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?;
5857
ZookeeperZnode::merged_crd(ZookeeperZnode::V1Alpha1)?
59-
.print_yaml_schema(built_info::CARGO_PKG_VERSION, SerializeOptions::default())?;
58+
.print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?;
6059
}
6160
Command::Run(ProductOperatorRun {
6261
product_config,
@@ -69,13 +68,14 @@ async fn main() -> anyhow::Result<()> {
6968
APP_NAME,
7069
tracing_target,
7170
);
72-
stackable_operator::utils::print_startup_string(
73-
crate_description!(),
74-
crate_version!(),
75-
built_info::GIT_VERSION,
76-
built_info::TARGET_PLATFORM.unwrap_or("unknown target"),
77-
built_info::BUILT_TIME_UTC,
78-
built_info::RUSTC_VERSION,
71+
tracing::info!(
72+
built_info.pkg_version = built_info::PKG_VERSION,
73+
built_info.git_version = built_info::GIT_VERSION,
74+
built_info.target = built_info::TARGET,
75+
built_info.built_time_utc = built_info::BUILT_TIME_UTC,
76+
built_info.rustc_version = built_info::RUSTC_VERSION,
77+
"Starting {description}",
78+
description = built_info::PKG_DESCRIPTION
7979
);
8080
let product_config = product_config.load(&[
8181
"deploy/config-spec/properties.yaml",

0 commit comments

Comments
 (0)