From 04756d05a737b6a84cd3beeb7b357e0212252267 Mon Sep 17 00:00:00 2001 From: Pang Jin Hui Date: Mon, 18 Mar 2024 19:14:31 +0800 Subject: [PATCH] fix: fix lost log directory path for grapc log (#3387) --- contrib/rpc/grpcx/grpcx_grpc_server_unary.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/rpc/grpcx/grpcx_grpc_server_unary.go b/contrib/rpc/grpcx/grpcx_grpc_server_unary.go index d7e2953e846..5658da3b6b3 100644 --- a/contrib/rpc/grpcx/grpcx_grpc_server_unary.go +++ b/contrib/rpc/grpcx/grpcx_grpc_server_unary.go @@ -44,7 +44,7 @@ func (s *GrpcServer) handleAccessLog( "%s, %.3fms, %+v, %+v", info.FullMethod, float64(duration)/1e6, req, res, ) - s.config.Logger.Stdout(s.config.LogStdout).File(s.config.AccessLogPattern).Print(ctx, content) + s.config.Logger.Stdout(s.config.LogStdout).File(s.config.AccessLogPattern).Path(s.config.LogPath).Print(ctx, content) } // handleErrorLog handles the error logging for server. @@ -85,5 +85,5 @@ func (s *GrpcServer) handleErrorLog( } s.config.Logger.Stack(false). Stdout(s.config.LogStdout). - File(s.config.ErrorLogPattern).Error(ctx, content) + File(s.config.ErrorLogPattern).Path(s.config.LogPath).Error(ctx, content) }