From 08c0adf9142dffb6a001466d5d4772e11c20c2e1 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sun, 1 Mar 2009 18:32:30 +0100 Subject: port my previous fixes to lib-ui --- src/core/libs/lib-ui.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/libs/lib-ui.sh') diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index 76aeecf..cb40c9e 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -98,12 +98,12 @@ log () str="[LOG] `date +"%Y-%m-%d %H:%M:%S"` $@" if [ "$var_UI_TYPE" = dia ] then - echo -e "$str" >$LOG + echo -e "$str" >$LOG || die_error "Cannot log $str to $LOG" else - echo -e "$str" >$LOG + echo -e "$str" >$LOG || die_error "Cannot log $str to $LOG" fi - [ "$LOG_TO_FILE" = 1 ] && echo -e "$str" >> $LOGFILE + [ "$LOG_TO_FILE" = 1 ] && ( echo -e "$str" >> $LOGFILE || die_error "Cannot log $str to $LOGFILE" ) } @@ -114,11 +114,11 @@ debug () then if [ "$var_UI_TYPE" = dia ] then - echo -e "$str" > $LOG + echo -e "$str" > $LOG || die_error "Cannot debug $str to $LOG" else - echo -e "$str" > $LOG + echo -e "$str" > $LOG || die_error "Cannot debug $str to $LOG" fi - [ "$LOG_TO_FILE" = 1 ] && echo -e "$str" >> $LOGFILE + [ "$LOG_TO_FILE" = 1 ] && ( echo -e "$str" >> $LOGFILE || die_error "Cannot debug $str to $LOGFILE" ) fi } -- cgit v1.2.3-54-g00ecf