diff --git a/wrapper/Cargo.toml b/wrapper/Cargo.toml index 0b6e65e..5c35f8f 100644 --- a/wrapper/Cargo.toml +++ b/wrapper/Cargo.toml @@ -11,3 +11,4 @@ game = { version = "0.1", path = "../game"} tracing-subscriber = "0.2" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } sentry = "0.23" +tracing = "0.1" diff --git a/wrapper/src/main.rs b/wrapper/src/main.rs index e8336c3..197c422 100644 --- a/wrapper/src/main.rs +++ b/wrapper/src/main.rs @@ -1,15 +1,21 @@ -use game::{GameConfig, StaticGameData, game_begin}; +use game::{game_begin, GameConfig, StaticGameData}; #[tokio::main] async fn main() { // Enable logging - tracing_subscriber::fmt::init(); + tracing_subscriber::fmt() + .compact() + .with_thread_names(true) + .with_ansi(true) + .with_max_level(tracing::Level::INFO) + .init(); // Load the general config for the game // This happens here so we can properly track sentry events let game_config = GameConfig::load( StaticGameData::get("configs/application.json").expect("Failed to load application.json"), - ).unwrap(); + ) + .unwrap(); // Connect to sentry let _sentry_guard = sentry::init((