Project

General

Profile

« Previous | Next » 

Revision 9319

lib/sh/util.sh: use new log+ with a numeric arg instead of multiple calls to log++. use the command form of log-- (`log-- echo_func`) to counter the normal log++ performed by echo_func, for cases when the function name is descriptive and should be output at the same log_level as the commands it runs.

View differences:

lib/sh/util.sh
414 414

  
415 415
setup_log_fd() # view logging output at verbosity >= 5
416 416
{
417
	log++; log++; log++; echo_func; log++ 
417
	log+ 4; log-- echo_func 
418 418
	fd_set_default '30>&2' || true # stdlog
419 419
	log_fd=30 # stdlog
420 420
}
......
425 425
# this works even when /dev/tty isn't available
426 426
# view logging output at verbosity >= 3
427 427
{
428
	log++; echo_func; log++
428
	log+ 2; log-- echo_func
429 429
	# ignore errors if a source fd isn't open
430 430
	fd_set_default '20<&0' || true
431 431
	fd_set_default '21>&1' || true

Also available in: Unified diff