Revision 9380
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
257 | 257 |
fi # load new aliases |
258 | 258 |
if self_being_included; then |
259 | 259 |
|
260 |
can_log() { test "$verbosity" -gt 0; } # verbosity=0 turns off all logging |
|
260 |
can_log() { test "$(round_down "$verbosity")" -gt 0; } |
|
261 |
# verbosity=0 turns off all logging |
|
261 | 262 |
|
262 | 263 |
log() { if can_log; then echo "$log_indent$PS4$1" >&"$log_fd"; fi; } |
263 | 264 |
|
Also available in: Unified diff
lib/sh/util.sh: can_log(): support decimal verbosities using round_down()