Skip to content
Browse files

Adjust printing to print binary status data in a nice way.

  • Loading branch information...
1 parent 4537aa0 commit 4ed7c9637ed9eb8f1fb5d59d2738c8407f054d11 @kellymclaughlin kellymclaughlin committed
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/riak_kv_console.erl
View
11 src/riak_kv_console.erl
@@ -308,7 +308,12 @@ print_backend_statuses([]) ->
ok;
print_backend_statuses([Status | RestStatuses]) ->
{VNodeIndex, Backend, StatusData} = Status,
- StatusString = io_lib:format("VNode: ~p~nBackend: ~p~nStatus: ~p~n~n",
- [VNodeIndex, Backend, StatusData]),
- io:format("~s~n", [StatusString]),
+ if is_binary(StatusData) ->
+ StatusString = binary_to_list(StatusData),
+ io:format("VNode: ~p~nBackend: ~p~nStatus: ~n~s~n~n",
+ [VNodeIndex, Backend, string:strip(StatusString)]);
+ true ->
+ io:format("VNode: ~p~nBackend: ~p~nStatus: ~n~p~n~n",
+ [VNodeIndex, Backend, StatusData])
+ end,
print_backend_statuses(RestStatuses).

0 comments on commit 4ed7c96

Please sign in to comment.
Something went wrong with that request. Please try again.