Skip to content

Commit 15738c7

Browse files
committed
Better FFI tracing
Added/clarified `trace!` usage during a scaffolding call.
1 parent 2a311d2 commit 15738c7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

uniffi_macros/src/export/scaffolding.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,15 @@ pub(super) fn gen_ffi_function(
250250
::uniffi::rust_call(call_status, || {
251251
let result = match uniffi_lift_args() {
252252
::std::result::Result::Ok(uniffi_args) => {
253-
::uniffi::deps::trace!("success: {}", #ffi_fn_name);
253+
::uniffi::deps::trace!("lift_args success: {}", #ffi_fn_name);
254254
let uniffi_result = #rust_fn_call;
255-
#lower_return(#convert_result)
255+
::uniffi::deps::trace!("call success: {}", #ffi_fn_name);
256+
let uniffi_lowered_return = #lower_return(#convert_result);
257+
::uniffi::deps::trace!("lower_return success: {}", #ffi_fn_name);
258+
uniffi_lowered_return
256259
}
257260
::std::result::Result::Err((arg_name, error)) => {
258-
::uniffi::deps::trace!("error: {}", #ffi_fn_name);
261+
::uniffi::deps::trace!("lift_args error: {}", #ffi_fn_name);
259262
#handle_failed_lift(::uniffi::LiftArgsError { arg_name, error} )
260263
},
261264
};

0 commit comments

Comments
 (0)