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

Commit

Permalink
Update logging to use rabbit_log
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed Jul 30, 2015
1 parent 9262115 commit 8e9e5a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/autocluster_consul_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/autocluster_consul_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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.

0 comments on commit 8e9e5a2

Please sign in to comment.