Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #55 from heroku/m_equal_logplex_stats
Browse files Browse the repository at this point in the history
Add m= in front of logplex_stats logging so it's easier to group in splunk
  • Loading branch information
ferd committed Sep 19, 2013
2 parents b2d9ffd + bc93c09 commit 1f51ba0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/logplex_stats.erl
Expand Up @@ -152,20 +152,20 @@ start_timer() ->
erlang:start_timer(Time, ?MODULE, flush).

log_stat(UnixTS, #drain_stat{drain_id=DrainId, channel_id=ChannelId, key=Key}, Val) ->
io:format("logplex_stats ts=~p channel_id=~p drain_id=~p ~p=~p~n",
io:format("m=logplex_stats ts=~p channel_id=~p drain_id=~p ~p=~p~n",
[UnixTS, ChannelId, DrainId, Key, Val]);

log_stat(UnixTS, #channel_stat{channel_id=ChannelId, key=Key}, Val) ->
io:format("logplex_stats ts=~p channel_id=~p ~p=~p~n",
io:format("m=logplex_stats ts=~p channel_id=~p ~p=~p~n",
[UnixTS, ChannelId, Key, Val]);

log_stat(UnixTS, #logplex_stat{module=Mod, key=K}, Val) ->
io:format("logplex_stats ts=~p system module=~p ~200p=~p~n",
io:format("m=logplex_stats ts=~p system module=~p ~200p=~p~n",
[UnixTS, Mod, K, Val]);

log_stat(UnixTS, {Class, Key}, Val) ->
io:format("logplex_stats ts=~p freeform class=~p key=~p count=~p~n",
io:format("m=logplex_stats ts=~p freeform class=~p key=~p count=~p~n",
[UnixTS, Class, Key, Val]);

log_stat(UnixTS, Key, Val) when is_atom(Key); is_list(Key) ->
io:format("logplex_stats ts=~p ~p=~p~n", [UnixTS, Key, Val]).
io:format("m=logplex_stats ts=~p ~p=~p~n", [UnixTS, Key, Val]).

0 comments on commit 1f51ba0

Please sign in to comment.