diff --git a/grove/build/grove.logrotate b/grove/build/grove.logrotate index be57fdc819..afac8d1619 100644 --- a/grove/build/grove.logrotate +++ b/grove/build/grove.logrotate @@ -34,3 +34,14 @@ rotate 5 copytruncate } + +/var/log/grove/error.log { + compress + maxage 30 + missingok + nomail + size 100M + rotate 5 + copytruncate +} + diff --git a/grove/cache/handler.go b/grove/cache/handler.go index a1ff499cd7..9b3b4d6e92 100644 --- a/grove/cache/handler.go +++ b/grove/cache/handler.go @@ -175,10 +175,10 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { conn := (*web.InterceptConn)(nil) if realConn, ok := h.conns.Get(r.RemoteAddr); !ok { - log.Errorf("RemoteAddr '%v' not in Conns (reqid %v)\n", r.RemoteAddr, reqID) + log.Infof("RemoteAddr '%v' not in Conns (reqid %v)\n", r.RemoteAddr, reqID) } else { if conn, ok = realConn.(*web.InterceptConn); !ok { - log.Errorf("Could not get Conn info: Conn is not an InterceptConn: %T (reqid %v)\n", realConn, reqID) + log.Infof("Could not get Conn info: Conn is not an InterceptConn: %T (reqid %v)\n", realConn, reqID) } } @@ -186,7 +186,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if err == nil { // if we failed to get a remapping, there's no DSCP to set. if err := conn.SetDSCP(remappingProducer.DSCP()); err != nil { - log.Errorln(time.Now().Format(time.RFC3339Nano) + " " + r.RemoteAddr + " " + r.Method + " " + r.RequestURI + ": could not set DSCP: " + err.Error() + " (reqid " + strconv.FormatUint(reqID, 10) + ")") + log.Infoln(time.Now().Format(time.RFC3339Nano) + " " + r.RemoteAddr + " " + r.Method + " " + r.RequestURI + ": could not set DSCP: " + err.Error() + " (reqid " + strconv.FormatUint(reqID, 10) + ")") } } diff --git a/grove/web/listener.go b/grove/web/listener.go index 15873bee7f..a2d4a5b709 100644 --- a/grove/web/listener.go +++ b/grove/web/listener.go @@ -39,7 +39,7 @@ func getConnStateCallback(connMap *ConnMap) func(net.Conn, http.ConnState) { fallthrough case http.StateIdle: if iconn, ok := conn.(*InterceptConn); !ok { - log.Errorf("ConnState callback: idle conn is not a InterceptConn: '%T'\n", conn) + log.Infof("ConnState callback: idle conn is not a InterceptConn: '%T'\n", conn) } else { // MUST be zeroed when the conn moves to Idle, because the Active callback happens _after_ some/all bytes have been read iconn.bytesRead = 0 @@ -48,7 +48,7 @@ func getConnStateCallback(connMap *ConnMap) func(net.Conn, http.ConnState) { connMap.Remove(conn.RemoteAddr().String()) case http.StateActive: if iconn, ok := conn.(*InterceptConn); !ok { - log.Errorf("ConnState callback: active conn is not a InterceptConn: '%T'\n", conn) + log.Infof("ConnState callback: active conn is not a InterceptConn: '%T'\n", conn) } else { connMap.Add(iconn) }