gds-api-adapters icon indicating copy to clipboard operation
gds-api-adapters copied to clipboard

Logging doesn't appear to work

Open chrisroos opened this issue 7 years ago • 0 comments

The README explains that I can enable logging by setting GdsApi::Base.logger = Logger.new("/path/to/file.log"). I'm trying this locally but am not seeing any log output:

require 'gds_api/base'
GdsApi::Base.logger = Logger.new($stdout)
require 'gds_api/asset_manager'
asset_manager = GdsApi::AssetManager.new(Plek.find('asset-manager'))
asset_manager.asset('foo')

Am I missing something or should I expect this to work?

As an alternative I've been setting the RESTCLIENT_LOG environment variable (as per https://github.com/rest-client/rest-client#logging) in order to see the HTTP requests being made.

chrisroos avatar Jul 20 '17 17:07 chrisroos