Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions grove/build/grove.logrotate
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@
rotate 5
copytruncate
}

/var/log/grove/error.log {
compress
maxage 30
missingok
nomail
size 100M
rotate 5
copytruncate
}

6 changes: 3 additions & 3 deletions grove/cache/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,18 @@ 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)
}
}

remappingProducer, err := h.remapper.RemappingProducer(r, h.scheme)

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) + ")")
}
}

Expand Down
4 changes: 2 additions & 2 deletions grove/web/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down