Revision 9872
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
541 | 541 |
# usage: "echo_func" "$FUNCNAME" "$@" && indent || true |
542 | 542 |
# exit status: whether function call was echoed |
543 | 543 |
{ |
544 |
log++; can_log || return |
|
544 | 545 |
local func="$1"; shift |
545 |
log++ |
|
546 | 546 |
local loc; loc="$(clog++ func_loc "$func")" || return |
547 | 547 |
echo_cmd "$loc" "$func" "$@" |
548 |
can_log |
|
549 | 548 |
} |
550 | 549 |
# see echo_func alias after stub |
551 | 550 |
|
Also available in: Unified diff
lib/sh/util.sh: echo_func(): check can_log at beginning of function, so that the resource-intensive func_loc (which calls `readlink -f`) does not need to be called if echo_cmd would not log anything at the current verbosity