Skip to content

Commit

Permalink
fix: fix lost log directory path for grapc log (gogf#3387)
Browse files Browse the repository at this point in the history
  • Loading branch information
arceushui authored Mar 18, 2024
1 parent 409041b commit 04756d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/rpc/grpcx/grpcx_grpc_server_unary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
}

0 comments on commit 04756d0

Please sign in to comment.