chore: reduce log noise

This commit is contained in:
Jason Song 2022-11-14 17:36:39 +08:00
parent a1ddfb8200
commit ce39e45cc2

View File

@ -5,18 +5,18 @@
package bots package bots
import ( import (
"log"
"net/http" "net/http"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/routers/api/bots/grpc" "code.gitea.io/gitea/routers/api/bots/grpc"
) )
func grpcHandler(h http.Handler) http.HandlerFunc { func grpcHandler(h http.Handler) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return func(w http.ResponseWriter, r *http.Request) {
log.Println("protocol version:", r.Proto) log.Trace("protocol version:", r.Proto)
h.ServeHTTP(w, r) h.ServeHTTP(w, r)
}) }
} }
func gRPCRouter(r *web.Route, fn grpc.RouteFn) { func gRPCRouter(r *web.Route, fn grpc.RouteFn) {