koding / tunnel

Tunnel proxy package in Go
BSD 3-Clause "New" or "Revised" License
322 stars 71 forks source link

Log filtering "no virtual host available" #33

Open mmatczuk opened 8 years ago

mmatczuk commented 8 years ago

https://github.com/koding/tunnel/blob/master/server.go#L161

if !strings.Contains(err.Error(), "no virtual host available") { // this one is outputted too much, unnecessarily
    s.log.Error("remote %s (%s): %s", r.RemoteAddr, r.RequestURI, err)
}

Such filtering could be moved to logging package for grater flexibility.

Also logging could have a filter that would print this log every 100 or so occurrences so that you can see when system is flooded with those logs.