Project

General

Profile

« Previous | Next » 

Revision 9117

lib/sh/util.sh: renamed $log_indent to $log_level_indent to indicate that this is the string added at each level, rather than the entire indent

View differences:

util.sh
171 171
# usage: cmd || [type=...] die msg
172 172
die() { save_e; "log_${type:-err}" "$1"; rethrow; }
173 173

  
174
: "${log_indent=  }"
174
: "${log_level_indent=  }"
175 175

  
176 176
# usage: in func:      indent; ...
177 177
#        outside func: indent; ...; outdent
178
alias indent='declare PS4="$log_indent$PS4"'
179
alias outdent='declare PS4="${PS4#$log_indent}"'
178
alias indent='declare PS4="$log_level_indent$PS4"'
179
alias outdent='declare PS4="${PS4#$log_level_indent}"'
180 180

  
181 181
# usage: in func:      inc_log_level; ...
182 182
#        outside func: inc_log_level; ...; dec_log_level

Also available in: Unified diff