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

Commit

Permalink
Remove old tcpsyslog message processing code.
Browse files Browse the repository at this point in the history
  • Loading branch information
archaelus committed Feb 14, 2013
1 parent 5fc6218 commit 196609e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/tcp_proxy.erl
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ code_change(_OldVsn, State, _Extra) ->

-spec process_msgs([{msg, binary()} |
{malformed_msg, binary()}], #state{}) -> #state{}.
process_msgs(Msgs, S = #state{cb=undefined}) when is_list(Msgs) ->
lists:foreach(fun process_msg/1, Msgs),
S;
process_msgs(Msgs, S = #state{cb={Mod,ModState}}) ->
Fold = fun ({msg, Msg}, MS) ->
logplex_stats:incr(message_received),
Expand All @@ -158,15 +155,6 @@ process_msgs(Msgs, S = #state{cb={Mod,ModState}}) ->
Msgs),
S#state{cb={Mod,NewModState}}.

process_msg({msg, Msg}) ->
logplex_stats:incr(message_received),
logplex_realtime:incr(message_received),
logplex_queue:in(logplex_work_queue, Msg);
process_msg({malformed, Msg}) ->
?WARN("err=malformed_syslog_message data=\"~p\"~n",
[Msg]),
logplex_stats:incr(message_received_malformed).

duration(#state{connect_time=undefined}) ->
"undefined";
duration(#state{connect_time=T0}) ->
Expand Down

0 comments on commit 196609e

Please sign in to comment.