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
|
||||
}
|
||||
|
||||
changeloglevel () {
|
||||
setloglevel () {
|
||||
local loglevels
|
||||
declare -a loglevels
|
||||
loglevels=("ERROR" "WARN" "INFO" "DEBUG" "TRACE")
|
||||
if [[ ${loglevels[*]} =~ $1 ]]; then
|
||||
if [[ ${loglevels[*]} =~ "$1" ]]; then
|
||||
export LOGLEVEL=$1
|
||||
else
|
||||
logerror "LOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE"
|
||||
fi
|
||||
logerror "new LOGLEVEL is $LOGLEVEL"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue