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



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

def debug(*args)
  # no-op
end

#info(*args) ⇒ Object



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

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