Better error logging (#87)

* Better wrapper logging in case of error
pull/91/head
Alex 3 years ago committed by GitHub
parent bf99c67a18
commit 84446f36b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,10 +49,24 @@ ls -l "$cp_path/target/bin"
echo ""
echo " CodecPack target/pack/bin content:"
ls -l "$cp_path/target/pack/bin"
echo ""
echo " CodecPack status:"
cat "$cp_path/var/codec_requirements.json" || echo "file not exists"
echo ""
echo ""
echo "Gstreamer last stderr logs........................."
tail -22 /tmp/gstreamer*.stderr
echo "GSTInspect last stderr logs........................."
tail -22 /tmp/gstinspect*.stderr
echo ""
echo "GSTInspect last stderr.prev logs........................."
tail -22 /tmp/gstinspect*.stderr.prev
echo ""
echo "GSTLaunch last stderr logs........................."
tail -22 /tmp/gstlaunch*.stderr
echo ""
echo "GSTLaunch last stderr.prev logs........................."
tail -22 /tmp/gstlaunch*.stderr.prev
echo ""
echo "FFMPEG head logs..................................."
@ -61,3 +75,9 @@ echo ""
echo "FFMPEG last stderr logs............................"
tail -22 /tmp/ffmpeg*.stderr
echo ""
echo "FFMPEG prev head logs..................................."
head /tmp/ffmpeg*.stderr.prev
echo ""
echo "FFMPEG prev tail logs..................................."
tail -22 /tmp/ffmpeg*.stderr.prev

@ -126,7 +126,7 @@ check_dependencies() {
fi
done
if [[ missingDeps -eq 1 ]]; then
if [[ $missingDeps -eq 1 ]]; then
exit 1
fi
}
@ -157,8 +157,10 @@ clean() {
rm -f /tmp/tmp.wget
rm -f /tmp/ffmpeg.log
rm -f /tmp/ffmpeg*.stderr
rm -f /tmp/ffmpeg*.stderr.prev
rm -f /tmp/gstreamer.log
rm -f /tmp/gst*.stderr
rm -f /tmp/gst*.stderr.prev
}
download() {

@ -35,6 +35,11 @@ handle_error() {
endprocess() {
info "========================================[end ffmpeg $pid]"
newline
if [[ $errcode -eq 1 ]]; then
cp "$stderrfile" "$stderrfile.prev"
fi
rm -f "$stderrfile"
if [[ "$child" != "" ]]; then
@ -51,6 +56,8 @@ endprocess() {
trap endprocess SIGINT SIGTERM
trap handle_error ERR
rm -f /tmp/ffmpeg*.stderr.prev
newline
info "========================================[start ffmpeg $pid]"
info "DEFAULT ARGS: $*"

@ -35,6 +35,11 @@ handle_error() {
endprocess() {
info "========================================[end gst $pid]"
newline
if [[ $errcode -eq 1 ]]; then
cp "$stderrfile" "$stderrfile.prev"
fi
rm "$stderrfile"
if [[ "$child" != "" ]]; then
@ -51,6 +56,8 @@ endprocess() {
trap endprocess SIGINT SIGTERM
trap handle_error ERR
rm -f /tmp/gstinspect*.stderr.prev
newline
info "========================================[start gst-inspect $pid]"
info "GST_ARGS: $*"

@ -35,6 +35,11 @@ handle_error() {
endprocess() {
info "========================================[end gst $pid]"
newline
if [[ $errcode -eq 1 ]]; then
cp "$stderrfile" "$stderrfile.prev"
fi
rm "$stderrfile"
if [[ "$child" != "" ]]; then
@ -51,6 +56,8 @@ endprocess() {
trap endprocess SIGINT SIGTERM
trap handle_error ERR
rm -f /tmp/gstlaunch*.stderr.prev
newline
info "========================================[start gst-launch $pid]"
info "GST_ARGS: $*"

Loading…
Cancel
Save