diff --git a/app.go b/app.go index 89d605cb..c2260627 100644 --- a/app.go +++ b/app.go @@ -26,6 +26,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" v1 "github.com/juanfont/headscale/gen/go/headscale/v1" "github.com/philip-bui/grpc-zerolog" + zl "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/soheilhy/cmux" ginprometheus "github.com/zsais/go-gin-prometheus" @@ -480,6 +481,12 @@ func (h *Headscale) Serve() error { WriteTimeout: 0, } + if zl.GlobalLevel() == zl.TraceLevel { + zerolog.RespLog = true + } else { + zerolog.RespLog = false + } + grpcOptions := []grpc.ServerOption{ grpc.UnaryInterceptor( grpc_middleware.ChainUnaryServer(