class Protobuf::Rpc::Middleware::Logger
Public Class Methods
new(app)
click to toggle source
# File lib/protobuf/rpc/middleware/logger.rb, line 5 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
TODO: Figure out how to control when logs are flushed
# File lib/protobuf/rpc/middleware/logger.rb, line 10 def call(env) instrumenter.start instrumenter.flush(env) # Log request stats env = @app.call(env) instrumenter.stop instrumenter.flush(env) # Log response stats env end
Private Instance Methods
instrumenter()
click to toggle source
# File lib/protobuf/rpc/middleware/logger.rb, line 24 def instrumenter @instrumenter ||= Instrumenter.new end