commit f3be34a45925aaa5b6a1abc305876049a47cceb1
Author: Cecylia Bocovich <[email protected]>
Date:   Thu Sep 19 16:48:14 2019 -0400

    Removed extraneous log messages
    
    Many of our log messages were being used to generate metrics, but are
    now being aggregated and logged to a separate metrics log file and so we
    don't need them in the regular logs anymore.
    
    This addresses the goal of ticket #30830, to remove unecessary messages
    and keep broker logs for debugging purposes.
---
 broker/broker.go  | 7 -------
 broker/metrics.go | 1 -
 2 files changed, 8 deletions(-)

diff --git a/broker/broker.go b/broker/broker.go
index 4a88b94..12b4965 100644
--- a/broker/broker.go
+++ b/broker/broker.go
@@ -121,7 +121,6 @@ func (ctx *BrokerContext) Broker() {
                go func(request *ProxyPoll) {
                        select {
                        case offer := <-snowflake.offerChannel:
-                               log.Println("Passing client offer to snowflake 
proxy.")
                                request.offerChannel <- offer
                        case <-time.After(time.Second * ProxyTimeout):
                                // This snowflake is no longer available to 
serve clients.
@@ -164,7 +163,6 @@ func proxyPolls(ctx *BrokerContext, w http.ResponseWriter, 
r *http.Request) {
                w.WriteHeader(http.StatusBadRequest)
                return
        }
-       log.Println("Received snowflake: ", id)
 
        // Log geoip stats
        remoteIP, _, err := net.SplitHostPort(r.RemoteAddr)
@@ -177,12 +175,10 @@ func proxyPolls(ctx *BrokerContext, w 
http.ResponseWriter, r *http.Request) {
        // Wait for a client to avail an offer to the snowflake, or timeout if 
nil.
        offer := ctx.RequestOffer(id)
        if nil == offer {
-               log.Println("Proxy " + id + " did not receive a Client offer.")
                ctx.metrics.proxyIdleCount++
                w.WriteHeader(http.StatusGatewayTimeout)
                return
        }
-       log.Println("Passing client offer to snowflake.")
        w.Write(offer)
 }
 
@@ -201,7 +197,6 @@ func clientOffers(ctx *BrokerContext, w 
http.ResponseWriter, r *http.Request) {
        }
        // Immediately fail if there are no snowflakes available.
        if ctx.snowflakes.Len() <= 0 {
-               log.Println("Client: No snowflake proxies available.")
                ctx.metrics.clientDeniedCount++
                w.WriteHeader(http.StatusServiceUnavailable)
                return
@@ -215,7 +210,6 @@ func clientOffers(ctx *BrokerContext, w 
http.ResponseWriter, r *http.Request) {
        // Wait for the answer to be returned on the channel or timeout.
        select {
        case answer := <-snowflake.answerChannel:
-               log.Println("Client: Retrieving answer")
                ctx.metrics.clientProxyMatchCount++
                w.Write(answer)
                // Initial tracking of elapsed time.
@@ -249,7 +243,6 @@ func proxyAnswers(ctx *BrokerContext, w 
http.ResponseWriter, r *http.Request) {
                return
        }
 
-       log.Println("Received answer.")
        snowflake.answerChannel <- body
 }
 
diff --git a/broker/metrics.go b/broker/metrics.go
index ffa61e2..1b2032a 100644
--- a/broker/metrics.go
+++ b/broker/metrics.go
@@ -114,7 +114,6 @@ func (m *Metrics) UpdateCountryStats(addr string) {
 
        if !ok {
                country = "??"
-               log.Println("Unknown geoip")
        }
 
        //update map of unique ips and counts

_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to