Project

General

Profile

« Previous | Next » 

Revision 9686

lib/sh/util.sh: redir(), command(): log their function calls at the usual log_level (2) instead of one higher, so that they are printed in the call tree to help debugging

View differences:

util.sh
587 587
function redir() # usage: local redirs=(#<>...); redir cmd...; unset redirs
588 588
# to view only explicitly-displayed errors: explicit_errors_only=1 script...
589 589
{
590
	log++ echo_func; kw_params redirs
590
	echo_func; kw_params redirs
591 591
	(
592 592
		log++ set_fds "${redirs[@]}"
593 593
		(case "$1" in command__exec) shift;; esac; echo_redirs_cmd)
......
598 598

  
599 599
command() # usage: [cmd_log_fd=|1|2|#] [verbosity_min=] command extern_cmd...
600 600
{
601
	log++ echo_func; kw_params cmd_log_fd redirs verbosity_min
601
	echo_func; kw_params cmd_log_fd redirs verbosity_min
602 602
	# if no cmd_log_fd, limit log_fd in case command uses util.sh
603 603
	local cmd_log_fd="${cmd_log_fd-$log_fd}"
604 604
	local redirs=("${redirs[@]}")

Also available in: Unified diff