refactor!: moved v4l2ctrls logging to log_level verbose
BREAKING CHANGE: option log_v4l2ctrls is obsolete! Moved logging of capabilties to log_level: verbose Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
@@ -281,14 +281,9 @@ Simply add
|
||||
to your camera setup section. \
|
||||
Restart webcamd via mainsail (or your used UI) and you're good to go.
|
||||
|
||||
To determine which options or better said parameters your Webcam provides, \
|
||||
add to your
|
||||
To determine which options or better said parameters your Webcam provides, set at least
|
||||
|
||||
[webcamd]
|
||||
|
||||
section, simply
|
||||
|
||||
log_v4l2ctrls: true
|
||||
log_level: verbose
|
||||
|
||||
This will show you a list with available options. Like this:
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# shellcheck enable=require-variable-braces
|
||||
|
||||
# Exit upon Errors
|
||||
set -eE
|
||||
set -Ee
|
||||
|
||||
### Detect Hardware
|
||||
function detect_avail_cams {
|
||||
@@ -29,8 +29,6 @@ function detect_avail_cams {
|
||||
log_msg "${v4l} -> ${realpath}"
|
||||
if [ "$(log_level)" != "quiet" ]; then
|
||||
list_cam_formats "${v4l}"
|
||||
fi
|
||||
if [ "$(log_v4l2ctrls)" == "true" ]; then
|
||||
list_cam_v4l2ctrls "${v4l}"
|
||||
fi
|
||||
done
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# shellcheck enable=require-variable-braces
|
||||
|
||||
# Exit upon Errors
|
||||
set -eE
|
||||
set -Ee
|
||||
|
||||
## Logging
|
||||
function init_log_entry {
|
||||
@@ -35,10 +35,6 @@ function log_level {
|
||||
fi
|
||||
}
|
||||
|
||||
function log_v4l2ctrls {
|
||||
get_param webcamd log_v4l2ctrls 2> /dev/null || echo "false"
|
||||
}
|
||||
|
||||
function delete_log {
|
||||
local del_log logfile
|
||||
logfile="$(get_param "webcamd" log_path | sed "s#^~#${HOME}#gi")"
|
||||
@@ -48,7 +44,6 @@ function delete_log {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function log_msg {
|
||||
local msg logfile prefix
|
||||
msg="${1}"
|
||||
@@ -107,8 +102,6 @@ function print_cams {
|
||||
log_msg "Detected 'Raspicam' Device -> ${raspicam}"
|
||||
if [ ! "$(log_level)" = "quiet" ]; then
|
||||
list_cam_formats "${raspicam}"
|
||||
fi
|
||||
if [ "$(log_v4l2ctrls)" == "true" ]; then
|
||||
list_cam_v4l2ctrls "${raspicam}"
|
||||
fi
|
||||
fi
|
||||
|
@@ -6,7 +6,6 @@
|
||||
[webcamd]
|
||||
log_path: ~/klipper_logs/webcamd.log # Default logfile in ~/klipper_logs/webcamd.log
|
||||
log_level: verbose # Valid Options are quiet/verbose/debug
|
||||
log_v4l2ctrls: true
|
||||
|
||||
[cam 1]
|
||||
mode: mjpg # mjpg/rtsp/webrtc
|
||||
|
@@ -1,7 +1,6 @@
|
||||
[webcamd]
|
||||
log_path: ~/klipper_logs/webcamd.log # Default logfile in ~/klipper_logs/webcamd.log
|
||||
log_level: quiet # Valid Options are quiet/verbose/debug
|
||||
log_v4l2ctrls: false # if set to true, it logs available controls for camera
|
||||
delete_log: false # true to get fresh log on every start
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user