Class: GrpcInterceptors::Server::LoggingInterceptor
- Inherits:
-
GRPC::ServerInterceptor
- Object
- GRPC::ServerInterceptor
- GrpcInterceptors::Server::LoggingInterceptor
- Defined in:
- lib/grpc_interceptors/server/logging_interceptor.rb
Instance Method Summary collapse
-
#initialize(logger) ⇒ LoggingInterceptor
constructor
A new instance of LoggingInterceptor.
- #request_response(request: nil, call: nil, method: nil, &block) ⇒ Object
Constructor Details
#initialize(logger) ⇒ LoggingInterceptor
Returns a new instance of LoggingInterceptor.
9 10 11 12 13 |
# File 'lib/grpc_interceptors/server/logging_interceptor.rb', line 9 def initialize(logger) @logger = logger super() end |
Instance Method Details
#request_response(request: nil, call: nil, method: nil, &block) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/grpc_interceptors/server/logging_interceptor.rb', line 15 def request_response(request: nil, call: nil, method: nil, &block) Common::Logging.yield_and_log( logger: @logger, request: request, method: method, method_type: 'unary', kind: KIND, &block ) end |