1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-05 07:50:24 +08:00

adjust log level

This commit is contained in:
fumiama
2021-12-31 22:19:26 +08:00
parent a9ed112162
commit e9851947f2
7 changed files with 27 additions and 33 deletions

10
main.go
View File

@@ -8,6 +8,7 @@ import (
base14 "github.com/fumiama/go-base16384"
curve "github.com/fumiama/go-x25519"
"github.com/sirupsen/logrus"
"github.com/fumiama/WireGold/config"
"github.com/fumiama/WireGold/helper"
@@ -20,8 +21,15 @@ func main() {
gen := flag.Bool("g", false, "generate key pair")
showp := flag.Bool("p", false, "show my publickey")
file := flag.String("c", "config.yaml", "specify conf file")
mtu := flag.Int("m", 32768-68, "mtu")
mtu := flag.Int("m", 32768-68, "set the mtu of wg")
debug := flag.Bool("d", false, "print debug logs")
warn := flag.Bool("w", false, "only show logs above warn level")
flag.Parse()
if *debug {
logrus.SetLevel(logrus.DebugLevel)
} else if *warn {
logrus.SetLevel(logrus.WarnLevel)
}
if *help {
displayHelp("")
}