Revision 12831
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/lib/sh/util.sh | ||
---|---|---|
459 | 459 |
{ |
460 | 460 |
if test $# -gt 1; then log_local; fi # if cmd, only apply assignments to it |
461 | 461 |
# no local vars because w/o cmd, assignments should be applied to caller |
462 |
PS4="$(str="${PS4:0:1}" n=$((log_level+$1-1)) repeat)${PS4: -2}" |
|
463 | 462 |
log_level=$((log_level+$1)) |
463 |
PS4="$(str="${PS4:0:1}" n=$((log_level-1)) repeat)${PS4: -2}" |
|
464 | 464 |
"${@:2}" |
465 | 465 |
} |
466 | 466 |
log-() { log+ "-$1" "${@:2}"; } |
Also available in: Unified diff
lib/sh/util.sh: log+(): set log_level before PS4 so that the PS4 expr doesn't also need to add to log_level