From cf8ffea154d7695d1bdce68c1c7d22dde57e953f Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Sun, 10 Dec 2023 15:22:59 +0100 Subject: [PATCH] turn off grpc communication logging (#1640) --- CHANGELOG.md | 1 + hscontrol/app.go | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47652cba..bae27e31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ Use error group handling to ensure tests actually pass [#1535](https://github.co Fix hang on SIGTERM [#1492](https://github.com/juanfont/headscale/pull/1492) taken from [#1480](https://github.com/juanfont/headscale/pull/1480) Send logs to stderr by default [#1524](https://github.com/juanfont/headscale/pull/1524) Fix [TS-2023-006](https://tailscale.com/security-bulletins/#ts-2023-006) security UPnP issue [#1563](https://github.com/juanfont/headscale/pull/1563) +Turn off gRPC logging [#1640](https://github.com/juanfont/headscale/pull/1640) fixes [#1259](https://github.com/juanfont/headscale/issues/1259) ## 0.22.3 (2023-05-12) diff --git a/hscontrol/app.go b/hscontrol/app.go index 9a879c82..3ad32788 100644 --- a/hscontrol/app.go +++ b/hscontrol/app.go @@ -566,7 +566,10 @@ func (h *Headscale) Serve() error { } // Start the local gRPC server without TLS and without authentication - grpcSocket := grpc.NewServer(zerolog.UnaryInterceptor()) + grpcSocket := grpc.NewServer( + // Uncomment to debug grpc communication. + // zerolog.UnaryInterceptor(), + ) v1.RegisterHeadscaleServiceServer(grpcSocket, newHeadscaleV1APIServer(h)) reflection.Register(grpcSocket) @@ -606,7 +609,8 @@ func (h *Headscale) Serve() error { grpc.UnaryInterceptor( grpcMiddleware.ChainUnaryServer( h.grpcAuthenticationInterceptor, - zerolog.NewUnaryServerInterceptor(), + // Uncomment to debug grpc communication. + // zerolog.NewUnaryServerInterceptor(), ), ), }