refactor code
This commit is contained in:
parent
0aa79c27d1
commit
26ed9c12a2
|
@ -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"
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue