Project

General

Profile

« Previous | Next » 

Revision 9377

lib/sh/util.sh: log+: $verbosity: support decimal verbosities (but not decimal log_levels) by using new float+int

View differences:

lib/sh/util.sh
237 237
	# no local vars because w/o cmd, assignments should be applied to caller
238 238
	PS4="$(if test "$1" -gt 0; then echo "$(PS4_prefix_n)$PS4"
239 239
		else echo "${PS4: -$1}"; fi)" \
240
	verbosity=$((verbosity - $1)) "${@:2}"
240
	verbosity="$(float+int "$verbosity" "-$1")" "${@:2}"
241 241
}
242 242
log++() { log+  1 "$@"; }
243 243
log--() { log+ -1 "$@"; }

Also available in: Unified diff