   end
 
   def refresh(feed) do
-    IO.puts "Refresh #{feed.title}"
+    Logger.info "Refresh feed id: #{feed.id}, title: #{feed.title}"
 
     {:ok, json_body}   = fetch(feed.feed_url)
     parsed_feed        = parse_feed(json_body)

      {:error, reason}
    end
  end

  # TODO: store feed.last_build_date
  # defp store_feed(feed_url, feed_attrs) do
  #   changeset = Feed.changeset(%Feed{}, %{
  #     title: feed_attrs.title,
  #     feed_url: feed_url,
  #     site_url: feed_attrs.url
  #   })
  #   Repo.insert(changeset)
  # end

  # defp import_feed_with_content(feed_url) do
  #   IO.puts(feed_url)
  #
  #   {:ok, json_body}   = fetch(feed_url)
  #   feed               = parse_feed(json_body)
  #   {:ok, stored_feed} = store_feed(feed_url, feed)
  #
  #   Enum.each(feed.entries, fn(entry) -> store_entry(stored_feed, entry) end)
  # end

  defp store_entry(feed, entry) do
    published = entry[:updated] |> convert_to_ecto_date_time

defmodule WhistlerNewsReader.Fetcher do

  alias WhistlerNewsReader.Entry
  alias WhistlerNewsReader.Repo

  require Logger

  def refresh_all(feeds) do
    Enum.each(feeds, fn(feed) ->
