Class: Buildbox::API::ProxyLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/buildbox/api.rb

Overview

Faraday uses debug to show response information, but when the agent is in DEBUG mode, it’s kinda useless noise. So we use a ProxyLogger to only push the information we care about to the logger.

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ ProxyLogger

Returns a new instance of ProxyLogger.



12
13
14
# File 'lib/buildbox/api.rb', line 12

def initialize(logger)
  @logger = logger
end

Instance Method Details

#debug(*args) ⇒ Object



20
21
22
# File 'lib/buildbox/api.rb', line 20

def debug(*args)
  # no-op
end

#info(*args) ⇒ Object



16
17
18
# File 'lib/buildbox/api.rb', line 16

def info(*args)
  @logger.debug(*args)
end