commit
affb9aef42
1 file changed
+11
-1
+11
-1
@@ -22,7 +22,6 @@ func main() {
|
|||||||
|
|
||||||
log.SetPrefix(weave.Protocol + " ")
|
log.SetPrefix(weave.Protocol + " ")
|
||||||
log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds)
|
log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds)
|
||||||
log.Println(os.Args)
|
|
||||||
|
|
||||||
procs := runtime.NumCPU()
|
procs := runtime.NumCPU()
|
||||||
// packet sniffing can block an OS thread, so we need one thread
|
// packet sniffing can block an OS thread, so we need one thread
|
||||||
@@ -55,6 +54,17 @@ func main() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
peers = flag.Args()
|
peers = flag.Args()
|
||||||
|
|
||||||
|
options := make(map[string]string)
|
||||||
|
flag.Visit(func (f *flag.Flag) {
|
||||||
|
value := f.Value.String()
|
||||||
|
if f.Name == "password" {
|
||||||
|
value = "<elided>"
|
||||||
|
}
|
||||||
|
options[f.Name] = value
|
||||||
|
})
|
||||||
|
log.Println("Command line options:", options)
|
||||||
|
log.Println("Command line peers:", peers)
|
||||||
|
|
||||||
if ifaceName == "" {
|
if ifaceName == "" {
|
||||||
fmt.Println("Missing required parameter 'iface'")
|
fmt.Println("Missing required parameter 'iface'")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|||||||
Reference in new issue
Block a user