Skip to content

Commit 05bb108

Browse files
committed
chore: add logs to coin_gecko price module
1 parent f275d7f commit 05bb108

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

apps/explorer/lib/explorer/market/history/cataloger.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ defmodule Explorer.Market.History.Cataloger do
151151
end
152152

153153
defp market_cap_history(records, state) do
154+
require Logger
155+
Logger.info("inserting market records into db")
154156
Market.bulk_insert_history(records)
155157

156158
# Schedule next check for history

apps/explorer/lib/explorer/market/history/source/price/coin_gecko.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ defmodule Explorer.Market.History.Source.Price.CoinGecko do
1313
@impl SourcePrice
1414
def fetch_price_history(previous_days) do
1515
url = ExchangeRatesSourceCoinGecko.history_url(previous_days)
16+
r = Source.http_request(url, ExchangeRatesSourceCoinGecko.headers())
1617

17-
case Source.http_request(url, ExchangeRatesSourceCoinGecko.headers()) do
18+
require Logger
19+
Logger.info("fetching price history: #{inspect(url)} with headers: #{inspect(ExchangeRatesSourceCoinGecko.headers())}")
20+
Logger.info("result: #{inspect(r)}")
21+
22+
case r do
1823
{:ok, data} ->
1924
result =
2025
data

0 commit comments

Comments
 (0)