Allow user configurable log level option for some services
After some services were recently quieted down by adjusting the log level for e.g ffmpeg. It would be nice if the user can easily adjust the log level again so that that they can investigate or debug a issue since output is not generated by default, so now the Livestream, Spectrogream and Birdnet Recording have a adjustable log levels to help with this.
This commit is contained in:
@@ -2,8 +2,15 @@
|
||||
# Live Audio Stream Service Script
|
||||
source /etc/birdnet/birdnet.conf
|
||||
|
||||
# Set logging level
|
||||
LOGGING_LEVEL='error'
|
||||
# Read the logging level from the configuration option
|
||||
LOGGING_LEVEL="${LogLevel_LiveAudioStreamService}"
|
||||
# If empty for some reason default to log level of error
|
||||
[ -z $LOGGING_LEVEL ] && LOGGING_LEVEL='error'
|
||||
# Additionally if we're at debug or info level then allow printing of script commands and variables
|
||||
if [ "$LOGGING_LEVEL" == "info" ] || [ "$LOGGING_LEVEL" == "debug" ];then
|
||||
# Enable printing of commands/variables etc to terminal for debugging
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z ${REC_CARD} ];then
|
||||
echo "Stream not supported"
|
||||
|
||||
Reference in New Issue
Block a user