From 1abf0f04f3de26f62eecf0881056575c089c4533 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 15 Oct 2023 00:07:03 +0200 Subject: feat: add logging --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index aa492a3..ebdf491 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,8 @@ use engine::object::Object; use engine::vector::Vec3; use engine::vertex::Builder as VertexBuilder; use engine::{Engine, WindowSize}; +use tracing::Level; +use tracing_subscriber::FmtSubscriber; const WINDOW_SIZE: WindowSize = WindowSize { width: 500, @@ -13,6 +15,12 @@ const WINDOW_SIZE: WindowSize = WindowSize { fn main() -> Result<(), Box> { + let subscriber = FmtSubscriber::builder() + .with_max_level(Level::TRACE) + .finish(); + + tracing::subscriber::set_global_default(subscriber)?; + let engine = Engine::new(&WINDOW_SIZE, "Yaaay lmao")?; let triangle = Object::new(&[ -- cgit v1.2.3-18-g5258