Move first log message to after cli parsing
Browse files at this commitdf5512c0a87aeea3fe4ddd24d667cc6efc15a64cParent: ae47f211 changed file +6 -6
- src/main.rs +6 -6
src/main.rsmodified+6 -6
| @@ -74,12 +74,6 @@ fn main() { | |||
| 74 | .with_env_filter(env_filter) | 74 | .with_env_filter(env_filter) |
| 75 | .init(); | 75 | .init(); |
| 76 | 76 | ||
| 77 | - info!( | ||
| 78 | - "starting version {} ({})", | ||
| 79 | - env!("CARGO_PKG_VERSION"), | ||
| 80 | - git_version!(fallback = "unknown commit"), | ||
| 81 | - ); | ||
| 82 | - | ||
| 83 | if is_systemd_service { | 77 | if is_systemd_service { |
| 84 | // If we're starting as a systemd service, assume that the intention is to start on a TTY. | 78 | // If we're starting as a systemd service, assume that the intention is to start on a TTY. |
| 85 | // Remove DISPLAY or WAYLAND_DISPLAY from our environment if they are set, since they will | 79 | // Remove DISPLAY or WAYLAND_DISPLAY from our environment if they are set, since they will |
| @@ -98,6 +92,12 @@ fn main() { | |||
| 98 | 92 | ||
| 99 | let _client = tracy_client::Client::start(); | 93 | let _client = tracy_client::Client::start(); |
| 100 | 94 | ||
| 95 | + info!( | ||
| 96 | + "starting version {} ({})", | ||
| 97 | + env!("CARGO_PKG_VERSION"), | ||
| 98 | + git_version!(fallback = "unknown commit"), | ||
| 99 | + ); | ||
| 100 | + | ||
| 101 | // Load the config. | 101 | // Load the config. |
| 102 | miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new()))).unwrap(); | 102 | miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new()))).unwrap(); |
| 103 | let (mut config, path) = match Config::load(cli.config).context("error loading config") { | 103 | let (mut config, path) = match Config::load(cli.config).context("error loading config") { |