From 54799643e26023710e66fbe6a0fd73e650dff91b Mon Sep 17 00:00:00 2001 From: Martin Mende Date: Fri, 21 Feb 2025 23:23:21 +0100 Subject: [PATCH] Exposing GGMLLogLevel for custom log callbacks (#203) * Made GGMLLogLevel public --- src/common_logging.rs | 2 +- src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common_logging.rs b/src/common_logging.rs index e3cffee..bf192ce 100644 --- a/src/common_logging.rs +++ b/src/common_logging.rs @@ -52,7 +52,7 @@ pub(crate) use {generic_debug, generic_error, generic_info, generic_trace, gener // Of course Windows thinks it's a special little shit and // picks a signed integer for an unsigned type #[cfg_attr(all(windows, not(target_env = "gnu")), repr(i32))] -pub(crate) enum GGMLLogLevel { +pub enum GGMLLogLevel { None = whisper_rs_sys::ggml_log_level_GGML_LOG_LEVEL_NONE, Info = whisper_rs_sys::ggml_log_level_GGML_LOG_LEVEL_INFO, Warn = whisper_rs_sys::ggml_log_level_GGML_LOG_LEVEL_WARN, diff --git a/src/lib.rs b/src/lib.rs index 893f069..a6632a9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,7 @@ mod whisper_logging_hook; mod whisper_params; mod whisper_state; +pub use common_logging::GGMLLogLevel; pub use error::WhisperError; pub use standalone::*; pub use utilities::*;