diff options
-rw-r--r-- | src/core/libs/lib-ui.sh | 12 |
1 files changed, 6 insertions, 6 deletions
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 } |