From 359694f74cede0f47795e34300a40d225a88c0be Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 3 Oct 2024 07:57:07 +0200 Subject: [PATCH] add logs (#62) --- .github/dependabot.yml | 4 +++- client/js/src/control.js | 1 + client/src/remote_client/bin/main.rs | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4718bb3f..7a625400 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,9 @@ updates: schedule: interval: weekly - package-ecosystem: cargo - directory: "/" + directories: + - client + - server schedule: interval: daily diff --git a/client/js/src/control.js b/client/js/src/control.js index 6cd502ba..d291ffb9 100644 --- a/client/js/src/control.js +++ b/client/js/src/control.js @@ -40,6 +40,7 @@ export class Control extends EventEmitter { } send_ready() { + console.log("Sending ready"); this.emit("ready"); } diff --git a/client/src/remote_client/bin/main.rs b/client/src/remote_client/bin/main.rs index ad4741a0..e534736a 100644 --- a/client/src/remote_client/bin/main.rs +++ b/client/src/remote_client/bin/main.rs @@ -60,6 +60,7 @@ async fn main() { #[wasm_bindgen] impl RemoteClient { pub async fn start() { + log("starting client"); panic::set_hook(Box::new(console_error_panic_hook::hook)); let control = get_control(); let features = Features { @@ -79,9 +80,11 @@ impl RemoteClient { } pub async fn run(&mut self) { + log("running client"); loop { let p = self.control.receive_player_index().as_f64(); if let Some(p) = p { + log(&format!("received player index: {}", p)); self.state.control_player = Some(p as usize); self.state.show_player = p as usize; }