Project

General

Profile

« Previous | Next » 

Revision 9380

lib/sh/util.sh: can_log(): support decimal verbosities using round_down()

View differences:

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