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

Commit

Permalink
Merge pull request #4309 from Aircloak/edon/air/logging
Browse files Browse the repository at this point in the history
Move shadow db manager verbose logs to debug level
  • Loading branch information
edongashi authored May 7, 2020
2 parents 2e20930 + a6bfbef commit f257e24
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit f257e24

Please sign in to comment.