Skip to content
This repository was archived by the owner on Feb 15, 2018. It is now read-only.

Commit 8e9e5a2

Browse files
committed
Update logging to use rabbit_log
1 parent 9262115 commit 8e9e5a2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/autocluster_consul_client.erl

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
build_query/2,
1818
percent_encode/1]).
1919

20-
2120
%% @public
2221
%% @spec get(list(), proplist()) -> list()
2322
%% @doc Perform a HTTP GET request to consul for the specified path and qargs
@@ -44,7 +43,7 @@ post(Path, Body) ->
4443
case httpc:request(post, {build_url(Path, []), [], ?CONTENT_JSON, Body}, [], []) of
4544
{ok, {{_, 200, _}, _, _}} -> ok;
4645
{ok, {{_, S, Error}, _, _}} ->
47-
error_logger:error_msg("Consul response (~s): ~s~n", [S, Error]),
46+
rabbit_log:error("autocluster_client: Consul response (~s) ~s~n", [S, Error]),
4847
{error, S};
4948
{error, Reason} -> {error, Reason}
5049
end.

src/autocluster_consul_config.erl

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ maybe_convert_from_int([]) -> undefined;
122122
maybe_convert_from_int(Value) when is_integer(Value) =:= true -> integer_to_list(Value);
123123
maybe_convert_from_int(Value) when is_list(Value) =:= true -> Value;
124124
maybe_convert_from_int(Value) ->
125-
error_logger:error_msg("Unexpected data type for int or list value: ~p~n", [Value]),
125+
rabbit_log:error("Unexpected data type for int or list value: ~p~n", [Value]),
126126
Value.
127127

128128
%% @spec maybe_convert_to_int(Value) -> integer()
@@ -134,5 +134,5 @@ maybe_convert_to_int([]) -> undefined;
134134
maybe_convert_to_int(Value) when is_list(Value) =:= true -> list_to_integer(Value);
135135
maybe_convert_to_int(Value) when is_integer(Value) =:= true -> Value;
136136
maybe_convert_to_int(Value) ->
137-
error_logger:error_msg("Unexpected data type for int or list value: ~p~n", [Value]),
137+
rabbit_log:error("Unexpected data type for int or list value: ~p~n", [Value]),
138138
Value.

0 commit comments

Comments
 (0)