Project

General

Profile

« Previous | Next » 

Revision 9359

lib/sh/util.sh: logging: added description of the verbosities available, including what each one does and what it's useful for:

  1. verbosities:
  2. 0: just print errors. useful for cron jobs.
  3. 1: also external commands run. useful for running at the command line.
  4. 2: full graphical call tree. useful for determining where error occurred.
  5. 3: also values of variables. useful for low-level debugging.
  6. 4: also variables in util.sh commands. useful for debugging util.sh.
  7. 5: also variables in logging commands themselves. useful for debugging echo_*.
  8. 6+: not currently used (i.e. same as 5)

View differences:

util.sh
195 195
: "${verbosity:=0}" # ensure non-empty
196 196
export verbosity # propagate to invoked commands
197 197

  
198
# verbosities:
199
# 0: just print errors. useful for cron jobs.
200
# 1: also external commands run. useful for running at the command line.
201
# 2: full graphical call tree. useful for determining where error occurred.
202
# 3: also values of variables. useful for low-level debugging.
203
# 4: also variables in util.sh commands. useful for debugging util.sh.
204
# 5: also variables in logging commands themselves. useful for debugging echo_*.
205
# 6+: not currently used (i.e. same as 5)
206

  
198 207
# definition: the log_level is the minimum verbosity needed to display a message
199 208
# for messages that use can_log(), the log_level starts with *1*, not 0
200 209
# for unfiltered messages, the log_level is 0 (i.e. still output at verbosity=0)

Also available in: Unified diff