From ff1cb73230a1fd45ddc96825a942ff844c41fadc Mon Sep 17 00:00:00 2001 From: Alex Knauth Date: Tue, 27 Aug 2024 21:25:41 -0400 Subject: [PATCH] Fix log methods --- src/asr-capi/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/asr-capi/src/lib.rs b/src/asr-capi/src/lib.rs index 28f8e0b..b6986c2 100644 --- a/src/asr-capi/src/lib.rs +++ b/src/asr-capi/src/lib.rs @@ -1,6 +1,6 @@ #[cfg(target_pointer_width = "64")] use { - livesplit_auto_splitting::{time, wasi_path, Timer, TimerState}, + livesplit_auto_splitting::{time, wasi_path, LogLevel, Timer, TimerState}, std::{cell::RefCell, ffi::CStr, fmt, path::Path}, }; @@ -110,7 +110,11 @@ impl Timer for CTimer { fn set_variable(&mut self, _: &str, _: &str) {} - fn log(&mut self, message: fmt::Arguments<'_>) { + fn log_auto_splitter(&mut self, message: fmt::Arguments<'_>) { + log(self.log, message); + } + + fn log_runtime(&mut self, message: fmt::Arguments<'_>, _: LogLevel) { log(self.log, message); } }