]> granicus.if.org Git - ejabberd/commitdiff
Log just one [info] message on Carbons negotiation
authorHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 29 May 2014 13:21:11 +0000 (15:21 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 29 May 2014 13:21:11 +0000 (15:21 +0200)
Log one instead of three [info] messages when XEP-0280 (Message Carbons)
support is enabled or disabled successfully.  On failure, log an
additional [warning].

src/mod_carboncopy.erl

index 6f3101fcd076c900aed4889bcfd9b32fda1074ab..124a15f35ccbddf05264c210130da171b236a43c 100644 (file)
@@ -105,7 +105,7 @@ iq_handler1(From, To, IQ) ->
        iq_handler(From, To, IQ, ?NS_CC_1).
 
 iq_handler(From, _To,  #iq{type=set, sub_el = #xmlel{name = Operation, children = []}} = IQ, CC)->
-    ?INFO_MSG("carbons IQ received: ~p", [IQ]),
+    ?DEBUG("carbons IQ received: ~p", [IQ]),
     {U, S, R} = jlib:jid_tolower(From),
     Result = case Operation of
         <<"enable">>->
@@ -117,10 +117,10 @@ iq_handler(From, _To,  #iq{type=set, sub_el = #xmlel{name = Operation, children
     end,
     case Result of 
         ok ->
-           ?INFO_MSG("carbons IQ result: ok", []),
+           ?DEBUG("carbons IQ result: ok", []),
             IQ#iq{type=result, sub_el=[]};
        {error,_Error} ->
-           ?INFO_MSG("Error enabling / disabling carbons: ~p", [Result]),
+           ?WARNING_MSG("Error enabling / disabling carbons: ~p", [Result]),
             IQ#iq{type=error,sub_el = [?ERR_BAD_REQUEST]}
     end;