Project

General

Profile

« Previous | Next » 

Revision 12818

lib/sh/util.sh: log_err(): use red background for better visibility of errors, in the same way that lib/exc.py print_ex() does for column-based import

View differences:

util.sh
520 520
log_custom() # usage: symbol=... log_custom msg
521 521
{ log_indent="${log_indent//[^ ]/$symbol}" PS4="${PS4//[^ ]/$symbol}" log "$@";}
522 522

  
523
log_err() { symbol='#' format=7 log_fd="$err_fd" clog! log_custom " $1 "; }
523
bg_r='101;97' # red background with white text
524 524

  
525
log_err() { symbol='#' format="$bg_r" log_fd="$err_fd" clog! log_custom " $1 ";}
526

  
525 527
log_info() { symbol=: log_custom "$@"; }
526 528

  
527 529
log_hint!() { format=7 log_info " $1 "; }

Also available in: Unified diff