Skip to content

Commit e22362e

Browse files
committed
display SQLPage version in the logs on startup
fixes #390
1 parent 9cf3b4d commit e22362e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ async fn log_welcome_message(config: &AppConfig) {
4242
};
4343

4444
log::info!(
45-
"Server started successfully.
46-
SQLPage is now listening on {}
45+
"SQLPage v{} started successfully.
46+
Now listening on {}
4747
You can write your website's code in .sql files in {}.",
48+
env!("CARGO_PKG_VERSION"),
4849
address_message,
4950
config.web_root.display()
5051
);

src/webserver/http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ pub async fn run_server(config: &AppConfig, state: AppState) -> anyhow::Result<(
564564
if let Some(domain) = &config.https_domain {
565565
let mut listen_on_https = listen_on;
566566
listen_on_https.set_port(443);
567-
log::info!("Will start HTTPS server on {listen_on_https}");
567+
log::debug!("Will start HTTPS server on {listen_on_https}");
568568
let config = make_auto_rustls_config(domain, config);
569569
server = server
570570
.bind_rustls_0_22(listen_on_https, config)
@@ -573,7 +573,7 @@ pub async fn run_server(config: &AppConfig, state: AppState) -> anyhow::Result<(
573573
bail!("Please specify a value for https_domain in the configuration file. This is required when using HTTPS (port 443)");
574574
}
575575
if listen_on.port() != 443 {
576-
log::info!("Will start HTTP server on {listen_on}");
576+
log::debug!("Will start HTTP server on {listen_on}");
577577
server = server
578578
.bind(listen_on)
579579
.map_err(|e| bind_error(e, listen_on))?;

0 commit comments

Comments
 (0)