Skip to content

Commit e478190

Browse files
committed
Remove logging statements from project
1 parent b7b331c commit e478190

13 files changed

+2
-20
lines changed

app/controllers/application_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def deployment_environment?
150150

151151
def destination_url
152152
if session[:return_to]
153-
Rails.logger.debug("Returning user to: #{session[:return_to]}")
154153
session.delete(:return_to)
155154
elsif signed_in?
156155
if current_user.oldest_achievement_since_last_visit

app/controllers/sessions_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def force
2222

2323
def create
2424
#FIXME
25-
Rails.logger.debug "Authenticating: #{oauth}"
2625
raise "OmniAuth returned error #{params[:error]}" unless params[:error].blank?
2726
if signed_in?
2827
current_user.apply_oauth(oauth)

app/controllers/users_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def index
5959

6060
def create
6161
@user = User.for_omniauth(oauth)
62-
Rails.logger.debug("Creating User: #{@user.inspect}") if ENV['DEBUG']
6362

6463
ucp = user_create_params.dup
6564

app/models/badges/node_knockout.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,9 @@ def github_for(path)
117117
doc = Nokogiri::HTML(res.to_s)
118118
username = doc.css("a.github").first[:href].sub(/https?:\/\/github.com\//, '')
119119
role = doc.css(".role").first.text
120-
Rails.logger.info "Found node knockout #{role}: #{username}" if ENV['DEBUG']
121-
return [role, username]
120+
[role, username]
122121
rescue Exception => ex
123-
Rails.logger.warn("Was unable to determine github for #{path}") if ENV['DEBUG']
124-
return nil
122+
nil
125123
end
126124
end
127125

app/models/github_badge.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def initialize
1010
client_secret: ENV['GITHUB_SECRET']
1111
)
1212
rescue Exception => e
13-
Rails.logger.error("Failed to initialize octokit: #{e.message}") if ENV['DEBUG']
1413
end
1514

1615
def add(badge, github_username)

app/models/github_old.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def activities_for(github_username, times=1)
8383
links = []
8484
times.times do |index|
8585
index = index + 1
86-
Rails.logger.debug("Github Activity: Getting page #{index} for #{github_username}")
8786
res = Servant.get("https://github.com/#{github_username}.atom?page=#{index}")
8887
doc = Nokogiri::HTML(res.to_s)
8988
doc.xpath('//entry').each do |entry|

app/models/lanyrd.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def profile
3434
response = RestClient.get("#{API_URL}?twitter=#{username}&view=history")
3535
JSON.parse(response).with_indifferent_access
3636
rescue RestClient::ResourceNotFound
37-
Rails.logger.error("Was unable to find lanyrd data for #{username}") if ENV['DEBUG']
3837
{}
3938
end
4039
end

app/models/search.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,9 @@ def execute
4545
end
4646
end unless sort_criteria.nil?
4747

48-
ap facets if ENV['DEBUG']
49-
ap facets.to_tire unless facets.nil? if ENV['DEBUG']
5048
# Eval ? Really ?
5149
eval(facets.to_tire) unless facets.nil?
5250

53-
Rails.logger.debug ("[search](#{context.to_s}):" + JSON.pretty_generate(to_hash))
5451
end
5552
rescue Tire::Search::SearchRequestFailed, Errno::ECONNREFUSED
5653
if @options[:failover].nil?

app/models/slideshare.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def facts
2525
end
2626
end.compact
2727
rescue RestClient::ResourceNotFound
28-
Rails.logger.error("Was unable to find slideshare data for #{username}") if ENV['DEBUG']
2928
[]
3029
end
3130
end

app/models/speakerdeck.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def facts
2424
end
2525
end.compact
2626
rescue RestClient::ResourceNotFound
27-
Rails.logger.error("Was unable to find speakerdeck data for #{username}") if ENV['DEBUG']
2827
[]
2928
end
3029
end

app/models/teams/account.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ def save_with_payment(plan=nil)
4545
return false
4646
end
4747
rescue Stripe::CardError => e
48-
Rails.logger.error "Stripe error while creating customer: #{e.message}" if ENV['DEBUG']
4948
errors.add :base, e.message
5049
return false
5150
rescue Stripe::InvalidRequestError => e
52-
Rails.logger.error "Stripe error while creating customer: #{e.message}" if ENV['DEBUG']
5351
errors.add :base, "There was a problem with your credit card."
5452
# throw e if Rails.env.development?
5553
return false

app/models/user.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ def geocode_location
509509
self.city = geo.city
510510
end
511511
rescue Exception => ex
512-
Rails.logger.error("Failed geolocating '#{location}': #{ex.message}") if ENV['DEBUG']
513512
end
514513

515514
def activity_stats(since=Time.at(0), full=false)
@@ -712,7 +711,6 @@ def build_repo_followed_activity!(refresh=false)
712711
Importers::Protips::GithubImporter.import_from_follows(link[:description], link[:link], link[:date], self)
713712
end
714713
rescue RestClient::ResourceNotFound
715-
Rails.logger.warn("Unable to get activity for github #{github}") if ENV['DEBUG']
716714
[]
717715
end
718716

lib/importers.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def self.import_from_follows(description, link, date, owner)
1717
if protiplink = ProtipLink.find_by_encoded_url(link)
1818
protiplink.protip.upvote_by(owner, owner.tracking_code, Protip::DEFAULT_IP_ADDRESS) unless protiplink.protip.nil?
1919
else
20-
Rails.logger.debug "creating protip:#{description}, #{link}"
2120
language = GithubOld.new.predominant_repo_lanugage_for_link(link)
2221
description = (description && description.slice(0, Protip::MAX_TITLE_LENGTH))
2322
owner.protips.create(title: description, body: link, created_at: date, topics: ["Github", language].compact, created_by: Protip::IMPORTER, user: owner)

0 commit comments

Comments
 (0)