Class: GrpcInterceptors::Server::Logging

Inherits:
GRPC::ServerInterceptor
  • Object
show all
Defined in:
lib/grpc_interceptors/server/logging.rb

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ Logging

Returns a new instance of Logging.



9
10
11
12
13
# File 'lib/grpc_interceptors/server/logging.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
# File 'lib/grpc_interceptors/server/logging.rb', line 15

def request_response(request: nil, call: nil, method: nil, &block)
  log(request, method, 'unary', &block)
end