Merge pull request #283 from rade/275_do_not_log_password

Closes #275
This commit is contained in:
Bryan Boreham committed 2014-12-22 11:31:16 +00:00
commit affb9aef42
1 file changed
+11 -1
+11 -1
View File
@@ -22,7 +22,6 @@ func main() {
log.SetPrefix(weave.Protocol + " ")
log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds)
log.Println(os.Args)
procs := runtime.NumCPU()
// packet sniffing can block an OS thread, so we need one thread
@@ -55,6 +54,17 @@ func main() {
flag.Parse()
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 == "" {
fmt.Println("Missing required parameter 'iface'")
os.Exit(1)