Print version to log (#4226)
* Print version to log * Keep cargofmt happy * Keep cargo_fmt happy * Keep Clippy happy
This commit is contained in:
parent
a790a24c4d
commit
203ca9d617
1 changed files with 6 additions and 2 deletions
|
@ -49,6 +49,7 @@ use lemmy_utils::{
|
||||||
rate_limit::RateLimitCell,
|
rate_limit::RateLimitCell,
|
||||||
response::jsonify_plain_text_errors,
|
response::jsonify_plain_text_errors,
|
||||||
settings::{structs::Settings, SETTINGS},
|
settings::{structs::Settings, SETTINGS},
|
||||||
|
version,
|
||||||
};
|
};
|
||||||
use prometheus::default_registry;
|
use prometheus::default_registry;
|
||||||
use prometheus_metrics::serve_prometheus;
|
use prometheus_metrics::serve_prometheus;
|
||||||
|
@ -108,6 +109,9 @@ pub struct CmdArgs {
|
||||||
|
|
||||||
/// Placing the main function in lib.rs allows other crates to import it and embed Lemmy
|
/// Placing the main function in lib.rs allows other crates to import it and embed Lemmy
|
||||||
pub async fn start_lemmy_server(args: CmdArgs) -> Result<(), LemmyError> {
|
pub async fn start_lemmy_server(args: CmdArgs) -> Result<(), LemmyError> {
|
||||||
|
// Print version number to log
|
||||||
|
println!("Lemmy v{}", version::VERSION);
|
||||||
|
|
||||||
// return error 503 while running db migrations and startup tasks
|
// return error 503 while running db migrations and startup tasks
|
||||||
let mut startup_server_handle = None;
|
let mut startup_server_handle = None;
|
||||||
if args.http_server {
|
if args.http_server {
|
||||||
|
@ -133,7 +137,7 @@ pub async fn start_lemmy_server(args: CmdArgs) -> Result<(), LemmyError> {
|
||||||
let federation_enabled = local_site.federation_enabled;
|
let federation_enabled = local_site.federation_enabled;
|
||||||
|
|
||||||
if federation_enabled {
|
if federation_enabled {
|
||||||
println!("federation enabled, host is {}", &SETTINGS.hostname);
|
println!("Federation enabled, host is {}", &SETTINGS.hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
check_private_instance_and_federation_enabled(&local_site)?;
|
check_private_instance_and_federation_enabled(&local_site)?;
|
||||||
|
@ -144,7 +148,7 @@ pub async fn start_lemmy_server(args: CmdArgs) -> Result<(), LemmyError> {
|
||||||
let rate_limit_cell = RateLimitCell::new(rate_limit_config);
|
let rate_limit_cell = RateLimitCell::new(rate_limit_config);
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"Starting http server at {}:{}",
|
"Starting HTTP server at {}:{}",
|
||||||
SETTINGS.bind, SETTINGS.port
|
SETTINGS.bind, SETTINGS.port
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue