mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Convert all other veloren crates to use tracing
- Completely removed both `log` and `pretty_env_logger` and replaced with `tracing` and `tracing_subscriber` where necessary. - Converted all `log::info!(...)` et al. statements to just use the shorthand macro i.e. `info!`. This was mostly to make renaming easier.
This commit is contained in:
@ -12,5 +12,5 @@ default = ["worldgen"]
|
||||
server = { package = "veloren-server", path = "../server", default-features = false }
|
||||
common = { package = "veloren-common", path = "../common" }
|
||||
|
||||
log = "0.4.8"
|
||||
pretty_env_logger = "0.3.1"
|
||||
tracing = { version = "0.1", default-features = false , features = ["attributes"] }
|
||||
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec"] }
|
||||
|
@ -2,9 +2,9 @@
|
||||
#![allow(clippy::option_map_unit_fn)]
|
||||
|
||||
use common::clock::Clock;
|
||||
use log::info;
|
||||
use server::{Event, Input, Server, ServerSettings};
|
||||
use std::time::Duration;
|
||||
use tracing::info;
|
||||
|
||||
const TPS: u64 = 30;
|
||||
|
||||
@ -14,7 +14,8 @@ fn main() {
|
||||
if let Err(_) = std::env::var("RUST_LOG") {
|
||||
std::env::set_var("RUST_LOG", "info");
|
||||
}
|
||||
pretty_env_logger::init();
|
||||
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
info!("Starting server...");
|
||||
|
||||
|
Reference in New Issue
Block a user