wiggle: generate a span that is present at all levels

The code I wrote here prior was incorrect: a span is present at the
level specified and below; previously I thought it was present at the
level specified and above. So, previously, a TRACE-level event inside
this span would be associated with the module and function name provided
here. Now all events inside this span should be associated with it.
This commit is contained in:
Pat Hickey
2021-03-26 14:25:10 -07:00
parent 550c774c1d
commit 0466f47cb4

View File

@@ -69,8 +69,9 @@ pub fn define_func(
) -> Result<#abi_ret, #rt::Trap> { ) -> Result<#abi_ret, #rt::Trap> {
use std::convert::TryFrom as _; use std::convert::TryFrom as _;
// This span is present at all levels (ERROR and below)
let _span = #rt::tracing::span!( let _span = #rt::tracing::span!(
#rt::tracing::Level::TRACE, #rt::tracing::Level::ERROR,
"wiggle abi", "wiggle abi",
module = #mod_name, module = #mod_name,
function = #func_name function = #func_name