run: print 50 lines of server log
This commit is contained in:
parent
f52b83896e
commit
3f205c7e75
12
orcli
12
orcli
|
@ -1076,7 +1076,13 @@ EOF
|
|||
function error() {
|
||||
echo >&2 "[$(date +'%Y-%m-%dT%H:%M:%S')] ERROR: $1"
|
||||
shift
|
||||
for msg in "$@"; do echo >&2 "$msg"; done
|
||||
for msg in "$@"; do echo >&2 " $msg"; done
|
||||
if [[ -f "$OPENREFINE_TMPDIR/openrefine.log" ]]; then
|
||||
echo >&2 "last 50 lines of OpenRefine's server log:"
|
||||
echo >&2 "-----------------------------------------"
|
||||
tail >&2 -50 "$OPENREFINE_TMPDIR/openrefine.log"
|
||||
echo >&2 "-----------------------------------------"
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
function log() {
|
||||
|
@ -1572,7 +1578,7 @@ orcli_test_command() {
|
|||
break
|
||||
fi
|
||||
if [[ $i == 20 ]]; then
|
||||
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||
error "starting OpenRefine server failed!""
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -1864,7 +1870,7 @@ orcli_run_command() {
|
|||
break
|
||||
fi
|
||||
if [[ $i == 20 ]]; then
|
||||
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||
error "starting OpenRefine server failed!"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -3,7 +3,13 @@
|
|||
function error() {
|
||||
echo >&2 "[$(date +'%Y-%m-%dT%H:%M:%S')] ERROR: $1"
|
||||
shift
|
||||
for msg in "$@"; do echo >&2 "$msg"; done
|
||||
for msg in "$@"; do echo >&2 " $msg"; done
|
||||
if [[ -f "$OPENREFINE_TMPDIR/openrefine.log" ]]; then
|
||||
echo >&2 "last 50 lines of OpenRefine's server log:"
|
||||
echo >&2 "-----------------------------------------"
|
||||
tail >&2 -50 "$OPENREFINE_TMPDIR/openrefine.log"
|
||||
echo >&2 "-----------------------------------------"
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
function log() {
|
||||
|
|
|
@ -62,7 +62,7 @@ for i in {1..20}; do
|
|||
break
|
||||
fi
|
||||
if [[ $i == 20 ]]; then
|
||||
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||
error "starting OpenRefine server failed!"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ for i in {1..20}; do
|
|||
break
|
||||
fi
|
||||
if [[ $i == 20 ]]; then
|
||||
error "starting OpenRefine server failed!" "$(cat "$OPENREFINE_TMPDIR/openrefine.log")"
|
||||
error "starting OpenRefine server failed!"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue