Skip to content
Snippets Groups Projects
Commit 665a10b9 authored by George Joseph's avatar George Joseph Committed by Asterisk Development Team
Browse files

logger.h: Add SCOPE_CALL and SCOPE_CALL_WITH_RESULT

If you're tracing a large function that may call another function
multiple times in different circumstances, it can be difficult to
see from the trace output exactly which location that function
was called from.  There's no good way to automatically determine
the calling location.  SCOPE_CALL and SCOPE_CALL_WITH_RESULT
simply print out a trace line before and after the call.

The difference between SCOPE_CALL and SCOPE_CALL_WITH_RESULT is
that SCOPE_CALL ignores the function's return value (if any) where
SCOPE_CALL_WITH_RESULT allows you to specify the type of the
function's return value so it can be assigned to a variable.
SCOPE_CALL_WITH_INT_RESULT is just a wrapper for SCOPE_CALL_WITH_RESULT
and the "int" return type.

(cherry picked from commit 2dc89afb2c13c5eb939fc384fbe9b11cba9e1477)
parent c78d46fb
Branches
Tags
1 merge request!193Merge tag '20.8.1' into 'merge-asterisk-20.8.1'
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment