change output

This commit is contained in:
Jakobus Schürz 2020-09-22 09:12:19 +02:00
parent 86045791d5
commit a17ab5dd9c

View file

@ -871,7 +871,7 @@ ssh-runinagent () {
setloglevel () { setloglevel () {
ENTRY ENTRY
local loglevels local loglevels
local oldloglevel=$LOGLEVEL local oldloglevel=${LOGLEVEL-$LOGLEVEL_DEFAULT}
declare -a loglevels declare -a loglevels
loglevels=("ERROR" "WARN" "INFO" "DEBUG" "TRACE") loglevels=("ERROR" "WARN" "INFO" "DEBUG" "TRACE")
if [[ ${loglevels[*]} =~ "$1" ]]; then if [[ ${loglevels[*]} =~ "$1" ]]; then
@ -879,14 +879,14 @@ setloglevel () {
else else
logerror "LOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE" logerror "LOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE"
fi fi
logerror "new LOGLEVEL is $LOGLEVEL (changed from $oldloglevel)" logerror "change LOGLEVEL from $oldloglevel -> $LOGLEVEL"
EXIT EXIT
} }
setfileloglevel () { setfileloglevel () {
ENTRY ENTRY
local loglevels local loglevels
local oldloglevel=${FILELOGLEVEL-${MYSHELLCONFIG_FILELOGLEVEL_DEFAULT}} local oldloglevel=${FILELOGLEVEL-${FILELOGLEVEL_DEFAULT}}
declare -a loglevels declare -a loglevels
loglevels=("ERROR" "WARN" "INFO" "DEBUG" "TRACE") loglevels=("ERROR" "WARN" "INFO" "DEBUG" "TRACE")
if [[ ${loglevels[*]} =~ "$1" ]]; then if [[ ${loglevels[*]} =~ "$1" ]]; then
@ -894,7 +894,7 @@ setfileloglevel () {
else else
logerror "FILELOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE" logerror "FILELOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE"
fi fi
logerror "new FILELOGLEVEL is $FILELOGLEVEL (changed from $oldloglevel)" logerror "change FILELOGLEVEL from $oldloglevel -> $FILELOGLEVEL"
EXIT EXIT
} }