Class: GrpcAccessLoggingInterceptor::DefaultLogger
- Inherits:
-
Object
- Object
- GrpcAccessLoggingInterceptor::DefaultLogger
- Defined in:
- lib/grpc_access_logging_interceptor/default_logger.rb
Instance Method Summary collapse
-
#initialize(logger: Logger.new($stdout)) ⇒ DefaultLogger
constructor
A new instance of DefaultLogger.
- #log(data) ⇒ Object
Constructor Details
#initialize(logger: Logger.new($stdout)) ⇒ DefaultLogger
Returns a new instance of DefaultLogger.
7 8 9 |
# File 'lib/grpc_access_logging_interceptor/default_logger.rb', line 7 def initialize(logger: Logger.new($stdout)) @logger = logger end |
Instance Method Details
#log(data) ⇒ Object
12 13 14 |
# File 'lib/grpc_access_logging_interceptor/default_logger.rb', line 12 def log(data) @logger.info(data.to_json) end |