motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.94k stars 650 forks source link

enhance motion startup logging and update "safety" workflow #2983

Closed MichaIng closed 4 months ago

MichaIng commented 4 months ago

I would actually like to append the motion/ffmpeg command's output to the error message, when obtaining the version fails. If these commands fail, either the binary is broken, or a linked library, or the CLI has changed. In every case, it would be helpful to have that error in motionEye logs.

The exception does not include the command's STDERR. utils.call_subprocess redirects SDTERR to /dev/null by default. So we could pass stderr=subprocess.PIPE and append output to the error message. But better would be probably to store/access STDERR separately, to append only that one to the error message, while parsing only STDOUT for the actual version string.

While this can be merged, I'll run some more tests regarding this, and am open for suggestions, of course.