Log git fetch failures to syslog.

In gerrit-git-prep.sh log git fetch failures to local syslog. Syslog
entries are tagged 'gerrit-git-prep' and have a priority of
user.warning.

Change-Id: I01f581a0a0442c65672ef8cb654e1a764f683eea
This commit is contained in:
Clark Boylan 2012-07-03 14:55:41 -07:00
parent 2dd8ebe53b
commit bf0d118e0d

View File

@ -44,11 +44,13 @@ function merge_change {
until git fetch https://$SITE/p/$PROJECT $REFSPEC
do
COUNT=$(($COUNT + 1))
logger -p user.warning -t 'gerrit-git-prep' FAILED: git fetch https://$SITE/p/$PROJECT $REFSPEC COUNT: $COUNT
if [ $COUNT -eq $MAX_ATTEMPTS ]
then
break
fi
SLEEP_TIME=$((30 + $RANDOM % 60))
logger -p user.warning -t 'gerrit-git-prep' sleep $SLEEP_TIME
sleep $SLEEP_TIME
done