@ -32,7 +32,6 @@ import (
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/p2p/netutil"
"github.com/ethereum/go-ethereum/p2p/netutil"
"golang.org/x/exp/slog"
)
)
func main ( ) {
func main ( ) {
@ -45,7 +44,7 @@ func main() {
natdesc = flag . String ( "nat" , "none" , "port mapping mechanism (any|none|upnp|pmp|pmp:<IP>|extip:<IP>)" )
natdesc = flag . String ( "nat" , "none" , "port mapping mechanism (any|none|upnp|pmp|pmp:<IP>|extip:<IP>)" )
netrestrict = flag . String ( "netrestrict" , "" , "restrict network communication to the given IP networks (CIDR masks)" )
netrestrict = flag . String ( "netrestrict" , "" , "restrict network communication to the given IP networks (CIDR masks)" )
runv5 = flag . Bool ( "v5" , false , "run a v5 topic discovery bootnode" )
runv5 = flag . Bool ( "v5" , false , "run a v5 topic discovery bootnode" )
verbosity = flag . Int ( "verbosity" , int ( log . LvlInfo ) , "log verbosity (0-5)" )
verbosity = flag . Int ( "verbosity" , 3 , "log verbosity (0-5)" )
vmodule = flag . String ( "vmodule" , "" , "log verbosity pattern" )
vmodule = flag . String ( "vmodule" , "" , "log verbosity pattern" )
nodeKey * ecdsa . PrivateKey
nodeKey * ecdsa . PrivateKey
@ -54,7 +53,8 @@ func main() {
flag . Parse ( )
flag . Parse ( )
glogger := log . NewGlogHandler ( log . NewTerminalHandler ( os . Stderr , false ) )
glogger := log . NewGlogHandler ( log . NewTerminalHandler ( os . Stderr , false ) )
glogger . Verbosity ( slog . Level ( * verbosity ) )
slogVerbosity := log . FromLegacyLevel ( * verbosity )
glogger . Verbosity ( slogVerbosity )
glogger . Vmodule ( * vmodule )
glogger . Vmodule ( * vmodule )
log . SetDefault ( log . NewLogger ( glogger ) )
log . SetDefault ( log . NewLogger ( glogger ) )