summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert@lshift.net>2008-11-27 22:29:10 +0000
committerHubert Plociniczak <hubert@lshift.net>2008-11-27 22:29:10 +0000
commit6fc919cd12a4a764801069abbc668284f5d4663f (patch)
tree2fe239a8712cb9f42297d54c180ae2156761830d /src
parentfb71f50fce0637d662597595fe1524fd7f61ec03 (diff)
downloadrabbitmq-server-git-6fc919cd12a4a764801069abbc668284f5d4663f.tar.gz
Added missing function message/4 which was
previously removed
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_log.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rabbit_log.erl b/src/rabbit_log.erl
index a8f839f0a6..cb8727bb93 100644
--- a/src/rabbit_log.erl
+++ b/src/rabbit_log.erl
@@ -32,7 +32,7 @@
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
--export([debug/1, debug/2, info/1, info/2,
+-export([debug/1, debug/2, message/4, info/1, info/2,
warning/1, warning/2, error/1, error/2]).
-import(io).
@@ -67,6 +67,9 @@ debug(Fmt) ->
debug(Fmt, Args) when is_list(Args) ->
gen_server:cast(?SERVER, {debug, Fmt, Args}).
+message(Direction, Channel, MethodRecord, Content) ->
+ gen_server:cast(?SERVER,
+ {message, Direction, Channel, MethodRecord, Content}).
info(Fmt) ->
gen_server:cast(?SERVER, {info, Fmt}).
@@ -100,6 +103,14 @@ handle_cast({debug, Fmt, Args}, State) ->
io:format("debug:: "), io:format(Fmt, Args),
error_logger:info_msg("debug:: " ++ Fmt, Args),
{noreply, State};
+handle_cast({message, Direction, Channel, MethodRecord, Content}, State) ->
+ io:format("~s ch~p ~p~n",
+ [case Direction of
+ in -> "-->";
+ out -> "<--" end,
+ Channel,
+ {MethodRecord, Content}]),
+ {noreply, State};
handle_cast({info, Fmt}, State) ->
error_logger:info_msg(Fmt),
{noreply, State};