Permalink
Browse files

CLC-696 Tweak log levels, set default log level back to WARN

  • Loading branch information...
1 parent b423ffd commit 7921b36217d8c0d1ebaa058aefef537ec9651b63 Chris Tweney committed Dec 5, 2012
Showing with 6 additions and 6 deletions.
  1. +5 −5 app/models/my_tasks.rb
  2. +1 −1 config/settings.yml
@@ -42,6 +42,7 @@ def fetch_google_tasks
google_proxy = GoogleProxy.new(user_id: @uid)
google_tasks_results = google_proxy.tasks_list
+ logger.info "#{self.class.name} Sorting Google tasks into buckets with starting_date #{@starting_date}"
google_tasks_results.each do |response_page|
next unless response_page.response.status == 200
@@ -65,7 +66,7 @@ def fetch_google_tasks
due_date = Date.parse(entry["due"].to_s) unless entry["due"].blank?
convert_due_date(due_date, formatted_entry)
bucket = determine_bucket(due_date, status, formatted_entry)
- logger.info "#{self.class.name} Putting Google task in #{bucket} bucket: #{formatted_entry}"
+ logger.info "#{self.class.name} Putting Google task with due_date #{formatted_entry["due_date"]} in #{bucket} bucket: #{formatted_entry}"
@buckets[bucket]["tasks"].push(formatted_entry)
end
end
@@ -76,10 +77,9 @@ def fetch_canvas_tasks
if CanvasProxy.access_granted?(@uid)
canvas_proxy = CanvasProxy.new(:user_id => @uid)
response = canvas_proxy.coming_up
- logger.info "#{self.class.name} response: #{response.status}"
if response.status == 200
results = JSON.parse response.body
- logger.info "#{self.class.name} canvas coming_up results: #{results}"
+ logger.info "#{self.class.name} Sorting Canvas tasks into buckets with starting_date #{@starting_date}"
results.each do |result|
formatted_entry = {
"type" => result["type"].downcase,
@@ -93,7 +93,7 @@ def fetch_canvas_tasks
due_date = result["start_at"]
convert_due_date(due_date, formatted_entry)
bucket = determine_bucket(due_date, "inprogress", formatted_entry)
- logger.info "#{self.class.name} Putting Canvas task with epoch #{formatted_entry["due_date"]["epoch"]} in #{bucket} bucket: #{formatted_entry}"
+ logger.info "#{self.class.name} Putting Canvas task with due_date #{formatted_entry["due_date"]} in #{bucket} bucket: #{formatted_entry}"
@buckets[bucket]["tasks"].push(formatted_entry)
end
end
@@ -132,7 +132,7 @@ def determine_bucket(due_date, status, formatted_entry)
bucket = "upcoming"
end
- logger.info "In determine_bucket, today = #{today}, today.zone = #{@starting_date.zone}, tomorrow = #{tomorrow} day after tomorrow = #{day_after_tomorrow}; formatted entry = #{formatted_entry}"
+ logger.debug "#{self.class.name} In determine_bucket, @starting_date = #{@starting_date}, today = #{today}; formatted entry = #{formatted_entry}"
end
bucket
end
View
@@ -1,5 +1,5 @@
logger:
- level: <%= INFO %>
+ level: <%= WARN %>
application:
# Set to true if testing production env without Apache/Nginx

0 comments on commit 7921b36

Please sign in to comment.