feat: log server version

This commit is contained in:
Songtronix 2020-03-26 12:41:30 +01:00
parent 30e6bbc851
commit 604a6cf169
2 changed files with 10 additions and 2 deletions

View File

@ -9,9 +9,12 @@ const TPS: u64 = 30;
fn main() {
// Init logging
if let Err(_) = std::env::var("RUST_LOG") {
std::env::set_var("RUST_LOG", "info");
}
pretty_env_logger::init();
info!("Starting server-cli...");
info!("Starting server...");
// Set up an fps clock
let mut clock = Clock::start();
@ -23,7 +26,7 @@ fn main() {
// Create server
let mut server = Server::new(settings).expect("Failed to create server instance!");
info!("Server is ready to accept connections");
info!("Server is ready to accept connections.");
info!("Metrics port: {}", metrics_port);
loop {

View File

@ -204,6 +204,11 @@ impl Server {
server_settings: settings.clone(),
};
debug!("created veloren server with: {:?}", &settings);
log::info!(
"Server version: {}[{}]",
*common::util::GIT_HASH,
*common::util::GIT_DATE
);
Ok(this)
}