mirror of
https://github.com/deajan/osync
synced 2024-11-11 07:10:40 +00:00
Simpler current log
This commit is contained in:
parent
cc2d283f23
commit
39feb76d2e
@ -31,7 +31,7 @@
|
||||
#### OFUNCTIONS MINI SUBSET ####
|
||||
#### OFUNCTIONS MICRO SUBSET ####
|
||||
_OFUNCTIONS_VERSION=2.3.0-RC2
|
||||
_OFUNCTIONS_BUILD=2019012801
|
||||
_OFUNCTIONS_BUILD=2019021401
|
||||
#### _OFUNCTIONS_BOOTSTRAP SUBSET ####
|
||||
_OFUNCTIONS_BOOTSTRAP=true
|
||||
#### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
|
||||
@ -192,8 +192,8 @@ function _Logger {
|
||||
echo -e "$logValue" >> "$LOG_FILE"
|
||||
|
||||
# Build current log file for alerts if we have a sufficient environment
|
||||
if [ "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP" != "" ]; then
|
||||
echo -e "$logValue" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP"
|
||||
if [ "$RUN_DIR/$PROGRAM" != "/" ]; then
|
||||
echo -e "$logValue" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP.log"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -498,7 +498,7 @@ function SendAlert {
|
||||
attachment=true
|
||||
fi
|
||||
|
||||
body="$MAIL_ALERT_MSG"$'\n\n'"Last 1000 lines of log"$'\n\n'"$(tail -n 1000 $RUN_DIR/$PROGRAM._Logger.$SCRIPT_PID.$TSTAMP)"
|
||||
body="$MAIL_ALERT_MSG"$'\n\n'"Last 1000 lines of current log"$'\n\n'"$(tail -n 1000 $RUN_DIR/$PROGRAM._Logger.$SCRIPT_PID.$TSTAMP.log)"
|
||||
|
||||
if [ $ERROR_ALERT == true ]; then
|
||||
subject="Error alert for $INSTANCE_ID"
|
||||
|
Loading…
Reference in New Issue
Block a user