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.
This commit is contained in:
Cecylia Bocovich 2019-09-19 16:48:14 -04:00
parent b29b49fc1c
commit f3be34a459
2 changed files with 0 additions and 8 deletions

View file

@ -121,7 +121,6 @@ func (ctx *BrokerContext) Broker() {
go func(request *ProxyPoll) { go func(request *ProxyPoll) {
select { select {
case offer := <-snowflake.offerChannel: case offer := <-snowflake.offerChannel:
log.Println("Passing client offer to snowflake proxy.")
request.offerChannel <- offer request.offerChannel <- offer
case <-time.After(time.Second * ProxyTimeout): case <-time.After(time.Second * ProxyTimeout):
// This snowflake is no longer available to serve clients. // 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) w.WriteHeader(http.StatusBadRequest)
return return
} }
log.Println("Received snowflake: ", id)
// Log geoip stats // Log geoip stats
remoteIP, _, err := net.SplitHostPort(r.RemoteAddr) 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. // Wait for a client to avail an offer to the snowflake, or timeout if nil.
offer := ctx.RequestOffer(id) offer := ctx.RequestOffer(id)
if nil == offer { if nil == offer {
log.Println("Proxy " + id + " did not receive a Client offer.")
ctx.metrics.proxyIdleCount++ ctx.metrics.proxyIdleCount++
w.WriteHeader(http.StatusGatewayTimeout) w.WriteHeader(http.StatusGatewayTimeout)
return return
} }
log.Println("Passing client offer to snowflake.")
w.Write(offer) 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. // Immediately fail if there are no snowflakes available.
if ctx.snowflakes.Len() <= 0 { if ctx.snowflakes.Len() <= 0 {
log.Println("Client: No snowflake proxies available.")
ctx.metrics.clientDeniedCount++ ctx.metrics.clientDeniedCount++
w.WriteHeader(http.StatusServiceUnavailable) w.WriteHeader(http.StatusServiceUnavailable)
return 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. // Wait for the answer to be returned on the channel or timeout.
select { select {
case answer := <-snowflake.answerChannel: case answer := <-snowflake.answerChannel:
log.Println("Client: Retrieving answer")
ctx.metrics.clientProxyMatchCount++ ctx.metrics.clientProxyMatchCount++
w.Write(answer) w.Write(answer)
// Initial tracking of elapsed time. // Initial tracking of elapsed time.
@ -249,7 +243,6 @@ func proxyAnswers(ctx *BrokerContext, w http.ResponseWriter, r *http.Request) {
return return
} }
log.Println("Received answer.")
snowflake.answerChannel <- body snowflake.answerChannel <- body
} }

View file

@ -114,7 +114,6 @@ func (m *Metrics) UpdateCountryStats(addr string) {
if !ok { if !ok {
country = "??" country = "??"
log.Println("Unknown geoip")
} }
//update map of unique ips and counts //update map of unique ips and counts