added a method to toggle restclient log to stdout in console

This commit is contained in:
booboy 2019-03-19 02:14:03 -05:00
parent 238d770d5e
commit 3ec18f5851

View file

@ -7,7 +7,18 @@ require 'bundler/setup'
require 'pastebinner'
require 'pry'
# setup restclient log to the console
# make it into a method to toggle on or off
def rest_client_toggle_log(default=false)
if default
RestClient.log = 'stdout'
end
end
pb = Pastebinner::ApiClient.new(ENV['pastebin_api_key'], ENV['pastebin_username'], ENV['pastebin_password'])
es = Pastebinner::ElasticSearchHelper.new(ENV['elastic_search_url'], 'pastes')
# sidekiq worker to send pastes to es
paste_to_es_job = Pastebinner::PasteToEs.new
binding.pry