change from changeloglevel to setloglevel
This commit is contained in:
parent
543484d51c
commit
6b3304a8bc
1 changed files with 3 additions and 2 deletions
|
@ -793,14 +793,15 @@ ssh-runinagent () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
changeloglevel () {
|
setloglevel () {
|
||||||
local loglevels
|
local loglevels
|
||||||
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
|
||||||
export LOGLEVEL=$1
|
export LOGLEVEL=$1
|
||||||
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue