forked from quic-go/quic-go
add verbose flag to example server
This commit is contained in:
@@ -13,13 +13,18 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
utils.SetLogLevel(utils.LogLevelDebug)
|
||||
|
||||
verbose := flag.Bool("v", false, "verbose")
|
||||
bindTo := flag.String("bind", "localhost", "bind to")
|
||||
certPath := flag.String("certpath", "", "certificate directory")
|
||||
www := flag.String("www", "/var/www", "www data")
|
||||
flag.Parse()
|
||||
|
||||
if *verbose {
|
||||
utils.SetLogLevel(utils.LogLevelDebug)
|
||||
} else {
|
||||
utils.SetLogLevel(utils.LogLevelInfo)
|
||||
}
|
||||
|
||||
var tlsConfig *tls.Config
|
||||
if *certPath == "" {
|
||||
tlsConfig = testdata.GetTLSConfig()
|
||||
|
||||
Reference in New Issue
Block a user