diff options
author | Hubert Plociniczak <hubert@lshift.net> | 2008-11-27 22:29:10 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert@lshift.net> | 2008-11-27 22:29:10 +0000 |
commit | cca40f8a6d46c9acab41837c18e2bc71aa89191e (patch) | |
tree | 2fe239a8712cb9f42297d54c180ae2156761830d /src/rabbit_log.erl | |
parent | 55f754eaa99ab8dbbb022c180b160bfa255c8fd8 (diff) | |
download | rabbitmq-server-cca40f8a6d46c9acab41837c18e2bc71aa89191e.tar.gz |
Added missing function message/4 which was
previously removed
Diffstat (limited to 'src/rabbit_log.erl')
-rw-r--r-- | src/rabbit_log.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rabbit_log.erl b/src/rabbit_log.erl index a8f839f0..cb8727bb 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}; |