Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: basho/riak_core
base: feuerlabs-stat-combo
...
head fork: basho/riak_core
compare: adt-sysmon-format
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 10 deletions.
  1. +7 −10 src/riak_core_sysmon_handler.erl
View
17 src/riak_core_sysmon_handler.erl
@@ -26,9 +26,6 @@
%% API
-export([add_handler/0]).
-%% Perhaps useful to the outside world.
--export([format_pretty_proc_info/1, format_pretty_proc_info/2,
- get_pretty_proc_info/1, get_pretty_proc_info/2]).
%% gen_event callbacks
-export([init/1, handle_event/2, handle_call/2,
@@ -81,9 +78,9 @@ init([]) ->
%% @end
%%--------------------------------------------------------------------
handle_event({monitor, Pid, Type, Info}, State) ->
- Pretty = format_pretty_proc_info(Pid, almost_current_function),
- lager:info("monitor ~w ~w ~s ~w",
- [Type, Pid, Pretty, Info]),
+ {Fmt, Args} = format_pretty_proc_info(Pid, almost_current_function),
+ lager:info("monitor ~w ~w "++ Fmt ++ " ~w",
+ [Type, Pid] ++ Args ++ [Info]),
{ok, State};
handle_event(Event, State) ->
lager:info("Monitor got ~p", [Event]),
@@ -161,13 +158,13 @@ format_pretty_proc_info(Pid, Acf) ->
try
case get_pretty_proc_info(Pid, Acf) of
undefined ->
- "";
+ {"", []};
Res ->
- io_lib:format("~w", [Res])
+ {"~w", [Res]}
end
catch X:Y ->
- io_lib:format("Pid ~w, ~W ~W at ~w\n",
- [Pid, X, 20, Y, 20, erlang:get_stacktrace()])
+ {"Pid ~w, ~W ~W at ~w\n",
+ [Pid, X, 20, Y, 20, erlang:get_stacktrace()]}
end.
get_pretty_proc_info(Pid) ->

No commit comments for this range

Something went wrong with that request. Please try again.