From 1760ab986e0768bd2dee9cf2e06cb82240fb66e6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 23 Jun 2022 15:21:57 +1000 Subject: [PATCH] Ignore s_glBindAttribLocation lines from sim --- rslib-bridge/src/logging.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/rslib-bridge/src/logging.rs b/rslib-bridge/src/logging.rs index 3c8b9530b..a69054ac4 100644 --- a/rslib-bridge/src/logging.rs +++ b/rslib-bridge/src/logging.rs @@ -62,13 +62,26 @@ fn monitor_io_handle(handle: BufferRedirect) { // currently EOF std::thread::sleep(Duration::from_secs(1)); } - Ok(_) => log::debug!("{}", buf), + Ok(_) => { + if !should_ignore_line(&buf) { + log::debug!("{}", buf) + } + } Err(err) => log::debug!("stdio err: {}", err), } } }); } +fn should_ignore_line(buf: &str) -> bool { + // quieten simulator noise + if buf.starts_with("s_glBindAttribLocation") { + true + } else { + false + } +} + pub(crate) fn setup_logging() -> Logger { // failure is expected after the first backend invocation let _ = redirect_io();