From 8e9e5a2adc12737fb43eed521543055c53854f34 Mon Sep 17 00:00:00 2001 From: "Gavin M. Roy" Date: Wed, 29 Jul 2015 21:53:25 -0400 Subject: [PATCH] Update logging to use rabbit_log --- src/autocluster_consul_client.erl | 3 +-- src/autocluster_consul_config.erl | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/autocluster_consul_client.erl b/src/autocluster_consul_client.erl index 6943a1f..b1191ff 100644 --- a/src/autocluster_consul_client.erl +++ b/src/autocluster_consul_client.erl @@ -17,7 +17,6 @@ build_query/2, percent_encode/1]). - %% @public %% @spec get(list(), proplist()) -> list() %% @doc Perform a HTTP GET request to consul for the specified path and qargs @@ -44,7 +43,7 @@ post(Path, Body) -> case httpc:request(post, {build_url(Path, []), [], ?CONTENT_JSON, Body}, [], []) of {ok, {{_, 200, _}, _, _}} -> ok; {ok, {{_, S, Error}, _, _}} -> - error_logger:error_msg("Consul response (~s): ~s~n", [S, Error]), + rabbit_log:error("autocluster_client: Consul response (~s) ~s~n", [S, Error]), {error, S}; {error, Reason} -> {error, Reason} end. diff --git a/src/autocluster_consul_config.erl b/src/autocluster_consul_config.erl index 27e456c..c1fda7e 100644 --- a/src/autocluster_consul_config.erl +++ b/src/autocluster_consul_config.erl @@ -122,7 +122,7 @@ maybe_convert_from_int([]) -> undefined; maybe_convert_from_int(Value) when is_integer(Value) =:= true -> integer_to_list(Value); maybe_convert_from_int(Value) when is_list(Value) =:= true -> Value; maybe_convert_from_int(Value) -> - error_logger:error_msg("Unexpected data type for int or list value: ~p~n", [Value]), + rabbit_log:error("Unexpected data type for int or list value: ~p~n", [Value]), Value. %% @spec maybe_convert_to_int(Value) -> integer() @@ -134,5 +134,5 @@ maybe_convert_to_int([]) -> undefined; maybe_convert_to_int(Value) when is_list(Value) =:= true -> list_to_integer(Value); maybe_convert_to_int(Value) when is_integer(Value) =:= true -> Value; maybe_convert_to_int(Value) -> - error_logger:error_msg("Unexpected data type for int or list value: ~p~n", [Value]), + rabbit_log:error("Unexpected data type for int or list value: ~p~n", [Value]), Value.