Skip to content
Snippets Groups Projects
Verified Commit 0568bbe1 authored by Denis Smirnov's avatar Denis Smirnov
Browse files

perf: improve logging

parent 0b934231
No related branches found
No related tags found
1 merge request!1414sbroad import
......@@ -9,13 +9,16 @@ macro_rules! log {
let _line: i32 = line!().try_into().unwrap_or(0);
#[cfg(not(feature = "mock"))]
{
tarantool::log::say(
tarantool::log::SayLevel::$level,
file!(),
_line,
$error,
$($message)*
);
let tnt_level: i32 = unsafe { tarantool::ffi::tarantool::LOG_LEVEL };
if tnt_level >= tarantool::log::SayLevel::$level as i32 {
tarantool::log::say(
tarantool::log::SayLevel::$level,
file!(),
_line,
$error,
$($message)*
);
}
}
}};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment