summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-10-15 00:07:03 +0200
committerHampusM <hampus@hampusmat.com>2023-10-15 00:07:03 +0200
commit1abf0f04f3de26f62eecf0881056575c089c4533 (patch)
tree2ce3a6b73091ab2010c5aaae1c4b0db533528ba5 /src/main.rs
parentda329909f93597970afd169cee28ece3bee7127b (diff)
feat: add logging
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 8 insertions, 0 deletions
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<dyn Error>>
{
+ 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(&[