@@ -46,7 +46,7 @@ pub(super) fn outb_log(mgr: &mut SandboxMemoryManager<HostSharedMemory>) -> Resu
4646
4747 // Convert from our LogLevel to tracing::Level
4848 let tracing_level: tracing:: Level = ( & log_data. level ) . into ( ) ;
49-
49+
5050 // Convert tracing::Level to log::Level for the Record API
5151 let record_level: Level = match tracing_level {
5252 tracing:: Level :: TRACE => Level :: Trace ,
@@ -207,7 +207,7 @@ pub(crate) fn handle_outb(
207207mod tests {
208208 use hyperlight_common:: flatbuffer_wrappers:: guest_log_level:: LogLevel ;
209209 use hyperlight_testing:: logger:: { LOGGER , Logger } ;
210- use log:: Level ;
210+ use tracing :: log:: { Level , LevelFilter } ;
211211 use tracing_core:: callsite:: rebuild_interest_cache;
212212
213213 use super :: outb_log;
@@ -234,7 +234,7 @@ mod tests {
234234 #[ ignore]
235235 fn test_log_outb_log ( ) {
236236 Logger :: initialize_test_logger ( ) ;
237- LOGGER . set_max_level ( log :: LevelFilter :: Off ) ;
237+ LOGGER . set_max_level ( LevelFilter :: Off ) ;
238238
239239 let sandbox_cfg = SandboxConfiguration :: default ( ) ;
240240
@@ -281,7 +281,7 @@ mod tests {
281281 }
282282 {
283283 // now, test logging
284- LOGGER . set_max_level ( log :: LevelFilter :: Trace ) ;
284+ LOGGER . set_max_level ( LevelFilter :: Trace ) ;
285285 let mut mgr = new_mgr ( ) ;
286286 LOGGER . clear_log_calls ( ) ;
287287
@@ -314,7 +314,15 @@ mod tests {
314314 outb_log ( & mut mgr) . unwrap ( ) ;
315315
316316 LOGGER . test_log_records ( |log_calls| {
317- let expected_level: Level = ( & level) . into ( ) ;
317+ // Convert through tracing::Level first
318+ let tracing_level: tracing:: Level = ( & level) . into ( ) ;
319+ let expected_level: Level = match tracing_level {
320+ tracing:: Level :: TRACE => Level :: Trace ,
321+ tracing:: Level :: DEBUG => Level :: Debug ,
322+ tracing:: Level :: INFO => Level :: Info ,
323+ tracing:: Level :: WARN => Level :: Warn ,
324+ tracing:: Level :: ERROR => Level :: Error ,
325+ } ;
318326
319327 assert ! (
320328 log_calls
0 commit comments