From 5b42fc1d0d6be7d83ed80deaa3f8cdf0ab11a61f Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Sun, 17 Dec 2017 19:46:55 +0300 Subject: Avoid excessive logging of SQL failures --- src/mod_carboncopy_sql.erl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/mod_carboncopy_sql.erl') diff --git a/src/mod_carboncopy_sql.erl b/src/mod_carboncopy_sql.erl index 1b8e1e11..cda8c60d 100644 --- a/src/mod_carboncopy_sql.erl +++ b/src/mod_carboncopy_sql.erl @@ -48,8 +48,7 @@ enable(LUser, LServer, LResource, NS) -> "node=%(NodeS)s"]) of ok -> ok; - Err -> - ?ERROR_MSG("failed to update 'carboncopy' table: ~p", [Err]), + _Err -> {error, db_failure} end. @@ -60,8 +59,7 @@ disable(LUser, LServer, LResource) -> "and %(LServer)H and resource=%(LResource)s")) of {updated, _} -> ok; - Err -> - ?ERROR_MSG("failed to delete from 'carboncopy' table: ~p", [Err]), + _Err -> {error, db_failure} end. @@ -73,8 +71,7 @@ list(LUser, LServer) -> {selected, Rows} -> {ok, [{Resource, NS, binary_to_atom(Node, latin1)} || {Resource, NS, Node} <- Rows]}; - Err -> - ?ERROR_MSG("failed to select from 'carboncopy' table: ~p", [Err]), + _Err -> {error, db_failure} end. -- cgit v1.2.3