refactor code

This commit is contained in:
Ulric Qin 2022-09-05 11:00:12 +08:00
parent 0aa79c27d1
commit 26ed9c12a2
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ import (
_ "flashcat.cloud/categraf/inputs/net"
_ "flashcat.cloud/categraf/inputs/net_response"
_ "flashcat.cloud/categraf/inputs/netstat"
_ "flashcat.cloud/categraf/inputs/netstat_filter"
_ "flashcat.cloud/categraf/inputs/netstat_filter"
_ "flashcat.cloud/categraf/inputs/nfsclient"
_ "flashcat.cloud/categraf/inputs/nginx"
_ "flashcat.cloud/categraf/inputs/nginx_upstream_check"

View File

@ -4,6 +4,7 @@ import (
"fmt"
"log"
"os"
"strings"
"flashcat.cloud/categraf/config"
"flashcat.cloud/categraf/inputs"
@ -196,6 +197,7 @@ func (ins *Instance) Gather(slist *types.SampleList) {
}
func levelFilter(l string) level.Option {
l = strings.ToLower(l)
switch l {
case "debug":
return level.AllowDebug()