Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Move shadow db manager verbose logs to debug level #4309

Merged
merged 1 commit into from
May 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions air/lib/air/psql_server/shadow_db/manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,16 @@ defmodule Air.PsqlServer.ShadowDb.Manager do
defp normalize_column(%{"name" => name, "type" => type}), do: %{name: name, type: type}

defp update_shadow_db(state, tables) do
Logger.info("data source definition changed for #{state.data_source_name}, updating shadow database")
Logger.debug(fn ->
"Data source definition changed for #{state.data_source_name}/#{state.user.id}, updating shadow database"
end)

ensure_db!(state.user, state.data_source_name)
update_tables_definition(state, tables)
Logger.info("shadow database for #{state.data_source_name} updated")

Logger.debug(fn ->
"Shadow database for #{state.data_source_name}/#{state.user.id}, updated"
end)
end

defp ensure_db!(user, data_source_name) do
Expand Down