fix logging level

pull/2779/head
Ayrat Badykov 5 years ago
parent a2d947c4c8
commit 496f8f7907
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 8
      apps/explorer/lib/explorer/token/instance_metadata_retriever.ex
  2. 2
      apps/indexer/lib/indexer/fetcher/token_instance.ex

@ -70,7 +70,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do
fetch_json(%{"tokenURI" => {:ok, [decoded_json]}}) fetch_json(%{"tokenURI" => {:ok, [decoded_json]}})
rescue rescue
e -> e ->
Logger.error(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"], Logger.debug(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"],
fetcher: :token_instances fetcher: :token_instances
) )
@ -83,7 +83,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do
{:ok, %{metadata: json}} {:ok, %{metadata: json}}
rescue rescue
e -> e ->
Logger.error(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"], Logger.debug(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"],
fetcher: :token_instances fetcher: :token_instances
) )
@ -91,7 +91,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do
end end
def fetch_json(result) do def fetch_json(result) do
Logger.error(["Unknown metadata format #{inspect(result)}."], fetcher: :token_instances) Logger.debug(["Unknown metadata format #{inspect(result)}."], fetcher: :token_instances)
{:error, result} {:error, result}
end end
@ -111,7 +111,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do
end end
rescue rescue
e -> e ->
Logger.error(["Could not send request to token uri #{inspect(token_uri)}. error #{inspect(e)}"], Logger.debug(["Could not send request to token uri #{inspect(token_uri)}. error #{inspect(e)}"],
fetcher: :token_instances fetcher: :token_instances
) )

@ -72,7 +72,7 @@ defmodule Indexer.Fetcher.TokenInstance do
{:ok, _result} = Chain.upsert_token_instance(params) {:ok, _result} = Chain.upsert_token_instance(params)
result -> result ->
Logger.error( Logger.debug(
[ [
"failed to fetch token instance metadata for #{ "failed to fetch token instance metadata for #{
inspect({to_string(token_contract_address_hash), Decimal.to_integer(token_id)}) inspect({to_string(token_contract_address_hash), Decimal.to_integer(token_id)})

Loading…
Cancel
Save