Revision 8995
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/util.sh | ||
---|---|---|
96 | 96 |
alias dec_log_level='declare verbosity="$verbosity" PS4="${PS4#$log_indent}" |
97 | 97 |
let verbosity++' |
98 | 98 |
|
99 |
fi # load new aliases |
|
100 |
if self_being_included; then |
|
101 |
|
|
99 | 102 |
# usage: (limit_stderr; cmd...) || return |
100 | 103 |
# `|| return` needed on Mac because of bug where -e doesn't apply to () |
101 |
limit_stderr () { if ! can_log; then exec 2>/dev/null; fi; } |
|
104 |
limit_stderr () { inc_log_level; if ! can_log; then exec 2>/dev/null; fi; }
|
|
102 | 105 |
|
103 | 106 |
limit_stderr_cmd () # usage: [stdout2stderr=1] limit_stderr_cmd cmd... |
104 | 107 |
{ |
Also available in: Unified diff
lib/util.sh: limit_stderr (): increase the log_level so that stderr of verbose commands can be turned off separately from the names of the commands themselves. it will now usually have log_level 2, indicating output that is useful primarily for debugging (this is the same as for shell function calls).