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