[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [obfs4/master] Change the default logLevel to ERROR, upgrade some client warnings.



commit ce86fa4348bdd436eed69fccae366e2980bd7b37
Author: Yawning Angel <yawning@xxxxxxxxxxxxxx>
Date:   Wed Sep 3 12:50:43 2014 +0000

    Change the default logLevel to ERROR, upgrade some client warnings.
    
    Client side logs are less spammy than server side in general, so more
    messages should be visible at the default logLevel when running as a
    client.
    
    Server side logging will be spammy basically no matter what unless
    obfs4proxy gets into the (arguably dangerous) business of figuring out
    which errors are people being evil vs which ones are transient network
    issues, so most logging is suppressed by default, unless the admin
    choses to open the floodgates.
---
 obfs4proxy/obfs4proxy.go |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/obfs4proxy/obfs4proxy.go b/obfs4proxy/obfs4proxy.go
index cf8043a..85817f0 100644
--- a/obfs4proxy/obfs4proxy.go
+++ b/obfs4proxy/obfs4proxy.go
@@ -188,7 +188,7 @@ func clientHandler(f base.ClientFactory, conn *pt.SocksConn, proxyURI *url.URL)
 	// Deal with arguments.
 	args, err := f.ParseArgs(&conn.Req.Args)
 	if err != nil {
-		warnf("%s(%s) - invalid arguments: %s", name, addrStr, err)
+		errorf("%s(%s) - invalid arguments: %s", name, addrStr, err)
 		conn.Reject()
 		return
 	}
@@ -210,7 +210,7 @@ func clientHandler(f base.ClientFactory, conn *pt.SocksConn, proxyURI *url.URL)
 	}
 	remoteConn, err := dialFn("tcp", conn.Req.Target) // XXX: Allow UDP?
 	if err != nil {
-		warnf("%s(%s) - outgoing connection failed: %s", name, addrStr, elideError(err))
+		errorf("%s(%s) - outgoing connection failed: %s", name, addrStr, elideError(err))
 		conn.Reject()
 		return
 	}
@@ -220,13 +220,13 @@ func clientHandler(f base.ClientFactory, conn *pt.SocksConn, proxyURI *url.URL)
 	// bytes back and forth.
 	remote, err := f.WrapConn(remoteConn, args)
 	if err != nil {
-		warnf("%s(%s) - handshake failed: %s", name, addrStr, elideError(err))
+		errorf("%s(%s) - handshake failed: %s", name, addrStr, elideError(err))
 		conn.Reject()
 		return
 	}
 	err = conn.Grant(remoteConn.RemoteAddr().(*net.TCPAddr))
 	if err != nil {
-		warnf("%s(%s) - SOCKS grant failed: %s", name, addrStr, elideError(err))
+		errorf("%s(%s) - SOCKS grant failed: %s", name, addrStr, elideError(err))
 		return
 	}
 
@@ -391,7 +391,7 @@ func main() {
 	// Handle the command line arguments.
 	_, execName := path.Split(os.Args[0])
 	showVer := flag.Bool("version", false, "Print version and exit")
-	logLevelStr := flag.String("logLevel", "WARN", "Log level (ERROR/WARN/INFO)")
+	logLevelStr := flag.String("logLevel", "ERROR", "Log level (ERROR/WARN/INFO)")
 	flag.BoolVar(&enableLogging, "enableLogging", false, "Log to TOR_PT_STATE_LOCATION/"+obfs4proxyLogFile)
 	flag.BoolVar(&unsafeLogging, "unsafeLogging", false, "Disable the address scrubber")
 	flag.Parse()

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits