Project

General

Profile

« Previous | Next » 

Revision 12814

fix: lib/sh/util.sh: log_msg!(): indent each line, not just the first

View differences:

trunk/lib/sh/util.sh
507 507
	echo "${highlight:+[${format}m}$1${highlight:+}"
508 508
}
509 509

  
510
log_msg!() # highlights log_level 1 messages to stand out against other output
510
log_line!() # highlights log_level 1 messages to stand out against other output
511 511
{ echo "$log_indent$PS4$(highlight_msg "$1")" >&"$log_fd"; }
512 512

  
513
log_msg!()
514
{ split_lines "$1"; local l; for l in "${lines[@]}"; do log_line! "$l"; done; }
515

  
513 516
log() { if can_log; then log_msg! "$@"; fi; }
514 517

  
515 518
log_custom() # usage: symbol=... log_custom msg

Also available in: Unified diff