Project

General

Profile

« Previous | Next » 

Revision 8901

lib/util.sh: use inc_log_level where logging info should only be output for verbosity >= 2: echo_func, echo_vars, echo_stdin

View differences:

lib/util.sh
85 85

  
86 86
echo_func ()
87 87
{
88
	inc_log_level
88 89
	local script="$(canon_rel_path "${BASH_SOURCE[1]}")"
89 90
	echo_cmd "$script:${BASH_LINENO[0]}" "${FUNCNAME[1]}" "$@"
90 91
}
......
95 96

  
96 97
echo_stdin () # usage: input|echo_stdin|cmd
97 98
{
99
	inc_log_level
98 100
	if can_log; then
99 101
		echo ----- >&2
100 102
		tee -a /dev/stderr;
......
104 106
}
105 107

  
106 108
echo_vars () # usage: echo_vars var...
107
{ if can_log; then { echo -n "$PS4"; declare -p "${@%%=*}";} >&2; fi; }
109
{
110
	inc_log_level
111
	if can_log; then { echo -n "$PS4"; declare -p "${@%%=*}";} >&2; fi
112
}
108 113

  
109 114
echo_export ()
110 115
{

Also available in: Unified diff