openzeppelin_relayer/utils/
service_info_log.rs1use std::env;
3use tracing::info;
4
5pub fn log_service_info() {
7 let service_name = env!("CARGO_PKG_NAME");
8 let service_version = env!("CARGO_PKG_VERSION");
9
10 info!("=== OpenZeppelin Relayer Service Starting ===");
11 info!(service_name = %service_name, service_version = %service_version, "đ service");
12 info!(rust_version = %env!("CARGO_PKG_RUST_VERSION"), "đĻ rust version");
13
14 if let Ok(profile) = env::var("CARGO_PKG_PROFILE") {
16 info!(profile = %profile, "đ§ build profile");
17 }
18
19 info!(platform = %env::consts::OS, "đģ platform");
21 info!(architecture = %env::consts::ARCH, "đģ architecture");
22
23 if let Ok(cwd) = env::current_dir() {
25 info!(working_directory = %cwd.display(), "đ working directory");
26 }
27
28 if let Ok(rust_log) = env::var("RUST_LOG") {
30 info!(log_level = %rust_log, "đ§ log level");
31 }
32
33 if let Ok(config_path) = env::var("CONFIG_PATH") {
34 info!(config_path = %config_path, "đ§ config path");
35 }
36
37 info!(
39 started_at = %chrono::Utc::now().format("%Y-%m-%d %H:%M:%S UTC"),
40 "đ started at"
41 );
42
43 info!("âšī¸ Visit the Relayer documentation for more information https://docs.openzeppelin.com/relayer/");
45}