From 1ed6b9ad3a62a6f0ec70b9355543107e0f9c23f5 Mon Sep 17 00:00:00 2001 From: Oleksii Sholik Date: Fri, 29 Sep 2023 17:58:51 +0300 Subject: [PATCH] Debug-log successful SQL function definition --- components/electric/lib/electric/postgres/extension.ex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/electric/lib/electric/postgres/extension.ex b/components/electric/lib/electric/postgres/extension.ex index abaf045ee3..630979e001 100644 --- a/components/electric/lib/electric/postgres/extension.ex +++ b/components/electric/lib/electric/postgres/extension.ex @@ -289,8 +289,12 @@ defmodule Electric.Postgres.Extension do def define_functions(conn) do Enum.each(Functions.list(), fn {name, sql} -> case :epgsql.squery(conn, sql) do - {:ok, [], []} -> :ok - error -> raise "Failed to define function '#{name}' with error: #{inspect(error)}" + {:ok, [], []} -> + Logger.debug("Successfully (re)defined SQL function/procedure '#{name}'") + :ok + + error -> + raise "Failed to define function '#{name}' with error: #{inspect(error)}" end end) end