]> granicus.if.org Git - ejabberd/commitdiff
Make logging messages more consistent
authorEvgeny Khramtsov <ekhramtsov@process-one.net>
Mon, 24 Jun 2019 17:32:34 +0000 (20:32 +0300)
committerEvgeny Khramtsov <ekhramtsov@process-one.net>
Mon, 24 Jun 2019 17:32:34 +0000 (20:32 +0300)
76 files changed:
src/ejabberd_acme.erl
src/ejabberd_acme_comm.erl
src/ejabberd_auth.erl
src/ejabberd_bosh.erl
src/ejabberd_c2s.erl
src/ejabberd_captcha.erl
src/ejabberd_iq.erl
src/ejabberd_local.erl
src/ejabberd_mnesia.erl
src/ejabberd_oauth_rest.erl
src/ejabberd_redis.erl
src/ejabberd_riak.erl
src/ejabberd_router.erl
src/ejabberd_router_mnesia.erl
src/ejabberd_router_multicast.erl
src/ejabberd_router_redis.erl
src/ejabberd_router_riak.erl
src/ejabberd_router_sql.erl
src/ejabberd_s2s.erl
src/ejabberd_s2s_in.erl
src/ejabberd_s2s_out.erl
src/ejabberd_sm.erl
src/ejabberd_sm_redis.erl
src/ejabberd_sm_sql.erl
src/ejabberd_sql.erl
src/ejabberd_sql_sup.erl
src/ejabberd_update.erl
src/ejabberd_web_admin.erl
src/ejabberd_websocket.erl
src/ejabberd_xmlrpc.erl
src/ejd2sql.erl
src/eldap.erl
src/gen_iq_handler.erl
src/jd2ejd.erl
src/mod_admin_extra.erl
src/mod_announce.erl
src/mod_announce_sql.erl
src/mod_avatar.erl
src/mod_bosh_mnesia.erl
src/mod_bosh_redis.erl
src/mod_bosh_riak.erl
src/mod_bosh_sql.erl
src/mod_caps.erl
src/mod_delegation.erl
src/mod_fail2ban.erl
src/mod_http_api.erl
src/mod_http_fileserver.erl
src/mod_http_upload.erl
src/mod_http_upload_quota.erl
src/mod_metrics.erl
src/mod_mqtt_session.erl
src/mod_mqtt_ws.erl
src/mod_muc.erl
src/mod_muc_log.erl
src/mod_muc_mnesia.erl
src/mod_muc_room.erl
src/mod_muc_sql.erl
src/mod_multicast.erl
src/mod_offline.erl
src/mod_offline_sql.erl
src/mod_ping.erl
src/mod_privacy_sql.erl
src/mod_private_sql.erl
src/mod_proxy65_redis.erl
src/mod_proxy65_service.erl
src/mod_proxy65_sql.erl
src/mod_pubsub.erl
src/mod_register.erl
src/mod_register_web.erl
src/mod_roster.erl
src/mod_shared_roster.erl
src/mod_sip.erl
src/mod_sip_registrar.erl
src/mod_stream_mgmt.erl
src/mod_vcard.erl
src/prosody2ejabberd.erl

index cae6b71be6d20ba7306ac3b77961436ad09a7ada..95e54c520108302e529aa2e573e8a75bc3f1c8c8 100644 (file)
@@ -54,11 +54,11 @@ handle_call(_Request, _From, State) ->
     {stop, {unexpected_call, _Request, _From}, State}.
 
 handle_cast(_Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [_Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [_Msg]),
     {noreply, State}.
 
 handle_info(_Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [_Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [_Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
index 2a3efd543544cb5b02fdc02ae48dfac39c1cf7ee..1f5bdda86f4b6eb3d6124437ef32000b830c81ce 100644 (file)
@@ -398,7 +398,7 @@ decode(Json) ->
 
 -spec failed_http_request({ok, _} | {error, _}, url()) -> {error, _}.
 failed_http_request({ok, {{_, Code, Reason}, _Head, Body}}, Url) ->
-    ?ERROR_MSG("Got unexpected status code from <~s>: ~B, Body: ~s",
+    ?ERROR_MSG("Unexpected status code from <~s>: ~B, Body: ~s",
               [Url, Code, Body]),
     throw({error, {unexpected_code, Code, Reason}});
 failed_http_request({error, Reason}, Url) ->
index 389e65d85edfffebd30a522b8e42cbbfcdfddf1d..33e0d118ff617fcc2a09ddbf14a3b4cc5c0d3069 100644 (file)
@@ -144,7 +144,7 @@ handle_cast(config_reloaded, #state{host_modules = HostModules} = State) ->
     init_cache(NewHostModules),
     {noreply, State#state{host_modules = NewHostModules}};
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 handle_info(_Info, State) ->
index 14a0feb293664eb6b0d22147c52e870c5f74e003..73a82ab664ef1ef64b8e1e136aa42f66f888f4f3 100644 (file)
@@ -309,14 +309,14 @@ init([#body{attrs = Attrs}, IP, SID]) ->
     end.
 
 wait_for_session(_Event, State) ->
-    ?ERROR_MSG("unexpected event in 'wait_for_session': ~p",
+    ?ERROR_MSG("Unexpected event in 'wait_for_session': ~p",
               [_Event]),
     {next_state, wait_for_session, State}.
 
 wait_for_session(#body{attrs = Attrs} = Req, From,
                 State) ->
     RID = get_attr(rid, Attrs),
-    ?DEBUG("got request:~n** RequestID: ~p~n** Request: "
+    ?DEBUG("Got request:~n** RequestID: ~p~n** Request: "
           "~p~n** From: ~p~n** State: ~p",
           [RID, Req, From, State]),
     Wait = min(get_attr(wait, Attrs, undefined),
@@ -368,20 +368,20 @@ wait_for_session(#body{attrs = Attrs} = Req, From,
                             From)
     end;
 wait_for_session(_Event, _From, State) ->
-    ?ERROR_MSG("unexpected sync event in 'wait_for_session': ~p",
+    ?ERROR_MSG("Unexpected sync event in 'wait_for_session': ~p",
               [_Event]),
     {reply, {error, badarg}, wait_for_session, State}.
 
 active({#body{} = Body, From}, State) ->
     active1(Body, From, State);
 active(_Event, State) ->
-    ?ERROR_MSG("unexpected event in 'active': ~p",
+    ?ERROR_MSG("Unexpected event in 'active': ~p",
               [_Event]),
     {next_state, active, State}.
 
 active(#body{attrs = Attrs, size = Size} = Req, From,
        State) ->
-    ?DEBUG("got request:~n** Request: ~p~n** From: "
+    ?DEBUG("Got request:~n** Request: ~p~n** From: "
           "~p~n** State: ~p",
           [Req, From, State]),
     {ShaperState, Pause} =
@@ -409,7 +409,7 @@ active(#body{attrs = Attrs, size = Size} = Req, From,
        true -> active1(Req, From, State1)
     end;
 active(_Event, _From, State) ->
-    ?ERROR_MSG("unexpected sync event in 'active': ~p",
+    ?ERROR_MSG("Unexpected sync event in 'active': ~p",
               [_Event]),
     {reply, {error, badarg}, active, State}.
 
@@ -518,7 +518,7 @@ handle_event({change_shaper, Shaper}, StateName,
             State) ->
     {next_state, StateName, State#state{shaper_state = Shaper}};
 handle_event(_Event, StateName, State) ->
-    ?ERROR_MSG("unexpected event in '~s': ~p",
+    ?ERROR_MSG("Unexpected event in '~s': ~p",
               [StateName, _Event]),
     {next_state, StateName, State}.
 
@@ -558,7 +558,7 @@ handle_sync_event(deactivate_socket, _From, StateName,
     {reply, ok, StateName,
      StateData#state{c2s_pid = undefined}};
 handle_sync_event(_Event, _From, StateName, State) ->
-    ?ERROR_MSG("unexpected sync event in '~s': ~p",
+    ?ERROR_MSG("Unexpected sync event in '~s': ~p",
               [StateName, _Event]),
     {reply, {error, badarg}, StateName, State}.
 
@@ -584,7 +584,7 @@ handle_info({timeout, TRef, shaper_timeout}, StateName,
       _ -> {next_state, StateName, State}
     end;
 handle_info(_Info, StateName, State) ->
-    ?ERROR_MSG("unexpected info:~n** Msg: ~p~n** StateName: ~p",
+    ?ERROR_MSG("Unexpected info:~n** Msg: ~p~n** StateName: ~p",
               [_Info, StateName]),
     {next_state, StateName, State}.
 
@@ -676,7 +676,7 @@ drop_holding_receiver(State, RID) ->
     end.
 
 do_reply(State, From, Body, RID) ->
-    ?DEBUG("send reply:~n** RequestID: ~p~n** Reply: "
+    ?DEBUG("Send reply:~n** RequestID: ~p~n** Reply: "
           "~p~n** To: ~p~n** State: ~p",
           [RID, Body, From, State]),
     p1_fsm:reply(From, Body),
@@ -949,7 +949,7 @@ bosh_response(Body, Type) ->
      encode_body(Body, Type)}.
 
 bosh_response_with_msg(Body, Type, RcvBody) ->
-    ?DEBUG("send error reply:~p~n** Receiced body: ~p",
+    ?DEBUG("Send error reply:~p~n** Receiced body: ~p",
           [Body, RcvBody]),
     bosh_response(Body, Type).
 
index 63c36263f5553859ac4e2a169673dedccdc42c9b..3f5b3aa0c48b68f5b85fa01afa86e50479e4aaf3 100644 (file)
@@ -248,11 +248,11 @@ process_info(#{jid := JID} = State, {resend_presence, To}) ->
            process_presence_out(State, xmpp:set_to(Pres, To))
     end;
 process_info(State, Info) ->
-    ?WARNING_MSG("got unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     State.
 
 handle_unexpected_cast(State, Msg) ->
-    ?WARNING_MSG("got unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     State.
 
 reject_unauthenticated_packet(State, _Pkt) ->
index 2271a3bf9ff8e62a49ce5321b768a114d03def3f..cd07709abda835a9e9642db6e9bca2d110c80099 100644 (file)
@@ -345,7 +345,7 @@ handle_call(_Request, _From, State) ->
 handle_cast(_Msg, State) -> {noreply, State}.
 
 handle_info({remove_id, Id}, State) ->
-    ?DEBUG("captcha ~p timed out", [Id]),
+    ?DEBUG("CAPTCHA ~p timed out", [Id]),
     case ets:lookup(captcha, Id) of
        [#captcha{args = Args, pid = Pid}] ->
            callback(captcha_failed, Pid, Args),
index 4de88afa15b6f9ea18f6666d51d926eb69ffaf9f..cda5b57c96f6ddfd248dfe18e15a9876ba4d780c 100644 (file)
@@ -80,7 +80,7 @@ handle_cast({restart_timer, Expire}, State) ->
     State1 = State#state{expire = min(Expire, State#state.expire)},
     noreply(State1);
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     noreply(State).
 
 handle_info({route, IQ, Key}, State) ->
@@ -96,7 +96,7 @@ handle_info(timeout, State) ->
     Expire = clean(ets:first(?MODULE)),
     noreply(State#state{expire = Expire});
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     noreply(State).
 
 terminate(_Reason, _State) ->
index 6b530ec1bb6d9f325c7e8f6866487c9a269b7305..9cc3cc12339b55ba54dc27b4c245eea24e0938cf 100644 (file)
@@ -73,7 +73,7 @@ start_link() ->
 route(Packet) ->
     try do_route(Packet)
     catch ?EX_RULE(E, R, St) ->
-           ?ERROR_MSG("failed to route packet:~n~s~nReason = ~p",
+           ?ERROR_MSG("Failed to route packet:~n~s~nReason = ~p",
                       [xmpp:pp(Packet), {E, {R, ?EX_STACK(St)}}])
     end.
 
@@ -123,7 +123,7 @@ handle_info({route, Packet}, State) ->
     route(Packet),
     {noreply, State};
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
@@ -140,7 +140,7 @@ code_change(_OldVsn, State, _Extra) ->
 %%--------------------------------------------------------------------
 -spec do_route(stanza()) -> any().
 do_route(Packet) ->
-    ?DEBUG("local route:~n~s", [xmpp:pp(Packet)]),
+    ?DEBUG("Local route:~n~s", [xmpp:pp(Packet)]),
     Type = xmpp:get_type(Packet),
     To = xmpp:get_to(Packet),
     if To#jid.luser /= <<"">> ->
index 3ccf6af89b447f9510b994f80fdfc9361821b09b..c5fb7ab6d927768265ba54198f2d1d14a5e2809b 100644 (file)
@@ -438,7 +438,7 @@ mnesia_op(Fun, Args) ->
        {atomic, ok} ->
            {atomic, ok};
        Other ->
-           ?ERROR_MSG("failure on mnesia ~s ~p: ~p",
+           ?ERROR_MSG("Failure on mnesia ~s ~p: ~p",
                      [Fun, Args, Other]),
            Other
     end.
index 793e928b3c020bb97075dbb933d56d30a84feb9c..8ebfecf5a8f93e48340d90c37e906e9cf196ae83 100644 (file)
@@ -56,7 +56,7 @@ store(R) ->
         {ok, Code, _} when Code == 200 orelse Code == 201 ->
             ok;
         Err ->
-            ?ERROR_MSG("failed to store oauth record ~p: ~p", [R, Err]),
+            ?ERROR_MSG("Failed to store oauth record ~p: ~p", [R, Err]),
             {error, db_failure}
     end.
 
index 55e9dfcff0980ebf601c6ceb54b1be37267d1af2..29a8947ec75efd701a329d7c415df4fb182125ea 100644 (file)
@@ -390,7 +390,7 @@ handle_call({subscribe, Caller, Channels}, _From,
     eredis_subscribe(Pid, Channels),
     {reply, ok, State#state{subscriptions = Subs1}};
 handle_call(Request, _From, State) ->
-    ?WARNING_MSG("unexepected call: ~p", [Request]),
+    ?WARNING_MSG("Unexepected call: ~p", [Request]),
     {noreply, State}.
 
 handle_cast(_Msg, State) ->
@@ -423,7 +423,7 @@ handle_info({subscribed, Channel, Pid}, State) ->
            case maps:is_key(Channel, State#state.subscriptions) of
                true -> eredis_sub:ack_message(Pid);
                false ->
-                   ?WARNING_MSG("got subscription ack for unknown channel ~s",
+                   ?WARNING_MSG("Got subscription ack for unknown channel ~s",
                                 [Channel])
            end;
        _ ->
@@ -443,7 +443,7 @@ handle_info({message, Channel, Data, Pid}, State) ->
     end,
     {noreply, State};
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info = ~p", [Info]),
+    ?WARNING_MSG("Unexpected info = ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
@@ -497,7 +497,7 @@ do_connect(_, Server, Port, Pass, DB, ConnTimeout) ->
          (pos_integer(), {qp, redis_pipeline()}, integer()) ->
                  [{ok, redis_reply()} | redis_error()] | redis_error().
 call(I, {F, Cmd}, Retries) ->
-    ?DEBUG("redis query: ~p", [Cmd]),
+    ?DEBUG("Redis query: ~p", [Cmd]),
     Conn = get_connection(I),
     Res = try eredis:F(Conn, Cmd, ?CALL_TIMEOUT) of
              {error, Reason} when is_atom(Reason) ->
@@ -630,5 +630,5 @@ re_subscribe(Pid, Subs) ->
     end.
 
 eredis_subscribe(Pid, Channels) ->
-    ?DEBUG("redis query: ~p", [[<<"SUBSCRIBE">>|Channels]]),
+    ?DEBUG("Redis query: ~p", [[<<"SUBSCRIBE">>|Channels]]),
     eredis_sub:subscribe(Pid, Channels).
index 5eadcc8baff274f29e173da39d0b8bb98c26b328..5bf783612a942c964f98748550d4804e0b6b795c 100644 (file)
@@ -459,7 +459,7 @@ handle_cast(_Msg, State) ->
 handle_info({'DOWN', _MonitorRef, _Type, _Object, _Info}, State) ->
     {stop, normal, State};
 handle_info(_Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [_Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [_Info]),
     {noreply, State}.
 
 %% @private
@@ -511,7 +511,7 @@ log_error({error, Why} = Err, Function, Opts) ->
                 true ->
                      io_lib:fwrite("** Error: ~p", [Err])
              end,
-    ?ERROR_MSG("database error:~n** Function: ~p~n~s~s",
+    ?ERROR_MSG("Database error:~n** Function: ~p~n~s~s",
                [Function, Txt, ErrTxt]);
 log_error(_, _, _) ->
     ok.
index 325dd75f3d91eb765a9840eb1b92df6756d4c790..c72b58126056c40d1f855d6c401725bb28946719 100644 (file)
@@ -90,7 +90,7 @@ start_link() ->
 route(Packet) ->
     try do_route(Packet)
     catch ?EX_RULE(E, R, St) ->
-           ?ERROR_MSG("failed to route packet:~n~s~nReason = ~p",
+           ?ERROR_MSG("Failed to route packet:~n~s~nReason = ~p",
                       [xmpp:pp(Packet), {E, {R, ?EX_STACK(St)}}])
     end.
 
@@ -99,7 +99,7 @@ route(#jid{} = From, #jid{} = To, #xmlel{} = El) ->
     try xmpp:decode(El, ?NS_CLIENT, [ignore_els]) of
        Pkt -> route(From, To, Pkt)
     catch _:{xmpp_codec, Why} ->
-           ?ERROR_MSG("failed to decode xml element ~p when "
+           ?ERROR_MSG("Failed to decode xml element ~p when "
                       "routing from ~s to ~s: ~s",
                       [El, jid:encode(From), jid:encode(To),
                        xmpp:format_error(Why)])
@@ -334,7 +334,7 @@ handle_info({route, Packet}, State) ->
     route(Packet),
     {noreply, State};
 handle_info(Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
@@ -348,7 +348,7 @@ code_change(_OldVsn, State, _Extra) ->
 %%--------------------------------------------------------------------
 -spec do_route(stanza()) -> ok.
 do_route(OrigPacket) ->
-    ?DEBUG("route:~n~s", [xmpp:pp(OrigPacket)]),
+    ?DEBUG("Route:~n~s", [xmpp:pp(OrigPacket)]),
     case ejabberd_hooks:run_fold(filter_packet, OrigPacket, []) of
        drop ->
            ok;
index 329f5e0613a228b5836540259ee45b75e9a76af0..cfca2f9809d4d23d39d36c79182b1fcd2e4f93bf 100644 (file)
@@ -201,7 +201,7 @@ handle_info({'DOWN', _Ref, _Type, Pid, _Info}, State) ->
     transaction(F),
     {noreply, State};
 handle_info(Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
index 6dbaeb41a8ff5b21848529661ffee0f6bb464bd5..463444add3e2c0d797a41516d98712e213641ad6 100644 (file)
@@ -209,7 +209,7 @@ code_change(_OldVsn, State, _Extra) ->
 %% Destinations = [#jid]
 -spec do_route(binary(), [jid()], stanza()) -> any().
 do_route(Domain, Destinations, Packet) ->
-    ?DEBUG("route multicast:~n~s~nDomain: ~s~nDestinations: ~s~n",
+    ?DEBUG("Route multicast:~n~s~nDomain: ~s~nDestinations: ~s~n",
           [xmpp:pp(Packet), Domain,
            str:join([jid:encode(To) || To <- Destinations], <<", ">>)]),
     %% Try to find an appropriate multicast service
index cafb05b1310c0ad129fc71196f11df345e3bb68e..3213901a611aeb42d6535d19a55e064d4845a0b7 100644 (file)
@@ -139,7 +139,7 @@ handle_cast(_Msg, State) ->
     {noreply, State}.
 
 handle_info(Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
index 434034cd94bf64bae8fc462879cfe8c2981b63a5..3ff0b578c69a1ded9acffda505a6e74d62344761 100644 (file)
@@ -78,6 +78,6 @@ clean_table() ->
                      ejabberd_riak:delete(route, {Domain, Pid})
              end, Routes);
        {error, Err} ->
-           ?ERROR_MSG("failed to clean Riak 'route' table: ~p", [Err]),
+           ?ERROR_MSG("Failed to clean Riak 'route' table: ~p", [Err]),
            Err
     end.
index 940333d40f407020785775d329e6d61838cdb312..2dd7e079081623afb747ef54019b5b4d6924de9f 100644 (file)
@@ -44,7 +44,7 @@ init() ->
        {updated, _} ->
            ok;
        Err ->
-           ?ERROR_MSG("failed to clean 'route' table: ~p", [Err]),
+           ?ERROR_MSG("Failed to clean 'route' table: ~p", [Err]),
            Err
     end.
 
@@ -122,7 +122,7 @@ row_to_route(Domain, {ServerHost, NodeS, PidS, LocalHintS} = Row) ->
     catch _:{bad_node, _} ->
            [];
          ?EX_RULE(E, R, St) ->
-           ?ERROR_MSG("failed to decode row from 'route' table:~n"
+           ?ERROR_MSG("Failed to decode row from 'route' table:~n"
                       "Row = ~p~n"
                       "Domain = ~s~n"
                       "Reason = ~p",
index f499e82c252c535a737709eaffd77133dfe0f71a..98adff4a106f7272cdc994d5e78a5973fe19ce83 100644 (file)
@@ -91,7 +91,7 @@ start_link() ->
 route(Packet) ->
     try do_route(Packet)
     catch ?EX_RULE(E, R, St) ->
-            ?ERROR_MSG("failed to route packet:~n~s~nReason = ~p",
+            ?ERROR_MSG("Failed to route packet:~n~s~nReason = ~p",
                        [xmpp:pp(Packet), {E, {R, ?EX_STACK(St)}}])
     end.
 
@@ -348,12 +348,12 @@ clean_table_from_bad_node(Node) ->
 
 -spec do_route(stanza()) -> ok.
 do_route(Packet) ->
-    ?DEBUG("local route:~n~s", [xmpp:pp(Packet)]),
+    ?DEBUG("Local route:~n~s", [xmpp:pp(Packet)]),
     From = xmpp:get_from(Packet),
     To = xmpp:get_to(Packet),
     case start_connection(From, To) of
        {ok, Pid} when is_pid(Pid) ->
-         ?DEBUG("sending to process ~p~n", [Pid]),
+         ?DEBUG("Sending to process ~p~n", [Pid]),
          #jid{lserver = MyServer} = From,
            ejabberd_hooks:run(s2s_send_packet, MyServer, [Packet]),
            ejabberd_s2s_out:route(Pid, Packet);
@@ -484,7 +484,7 @@ new_connection(MyServer, Server, From, FromTo,
            end,
            [Pid1];
       {aborted, Reason} ->
-           ?ERROR_MSG("failed to register connection ~s -> ~s: ~p",
+           ?ERROR_MSG("Failed to register connection ~s -> ~s: ~p",
                       [MyServer, Server, Reason]),
            ejabberd_s2s_out:stop(Pid),
            []
index 4dbfbd70d2a81a6528f240d6c8e6fd3a982a5810..96cb93c252988d3e34f4931478a66b2a6712a2a5 100644 (file)
@@ -112,11 +112,11 @@ host_down(Host) ->
 %%% Hooks
 %%%===================================================================
 handle_unexpected_info(State, Info) ->
-    ?WARNING_MSG("got unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     State.
 
 handle_unexpected_cast(State, Msg) ->
-    ?WARNING_MSG("got unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     State.
 
 reject_unauthenticated_packet(State, _Pkt) ->
index 6f950841af1cb12efdccf8fb4b7619f0dbe1c04b..0741690d6b456b8ec3044162643558d9efab320d 100644 (file)
@@ -164,11 +164,11 @@ process_closed(#{server := LServer, remote_server := RServer} = State,
     xmpp_stream_out:set_timeout(State2, timer:seconds(Delay)).
 
 handle_unexpected_info(State, Info) ->
-    ?WARNING_MSG("got unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     State.
 
 handle_unexpected_cast(State, Msg) ->
-    ?WARNING_MSG("got unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     State.
 
 process_downgraded(State, _StreamStart) ->
index 69e8fcba2e860b6b248fddf6153938a4ec5833a8..47900e48fd7f561ac307bcb8ca1d2ea9c2db8809 100644 (file)
@@ -126,7 +126,7 @@ stop() ->
 route(To, Term) ->
     case catch do_route(To, Term) of
        {'EXIT', Reason} ->
-           ?ERROR_MSG("route ~p to ~p failed: ~p",
+           ?ERROR_MSG("Route ~p to ~p failed: ~p",
                       [Term, To, Reason]);
        _ ->
            ok
@@ -137,11 +137,11 @@ route(Packet) ->
     #jid{lserver = LServer} = xmpp:get_to(Packet),
     case ejabberd_hooks:run_fold(sm_receive_packet, LServer, Packet, []) of
        drop ->
-           ?DEBUG("hook dropped stanza:~n~s", [xmpp:pp(Packet)]);
+           ?DEBUG("Hook dropped stanza:~n~s", [xmpp:pp(Packet)]);
        Packet1 ->
            try do_route(Packet1), ok
            catch ?EX_RULE(E, R, St) ->
-                   ?ERROR_MSG("failed to route packet:~n~s~nReason = ~p",
+                   ?ERROR_MSG("Failed to route packet:~n~s~nReason = ~p",
                               [xmpp:pp(Packet1),
                                {E, {R, ?EX_STACK(St)}}])
            end
@@ -204,7 +204,7 @@ bounce_sm_packet({bounce, Packet} = Acc) ->
     ejabberd_router:route_error(Packet, Err),
     {stop, Acc};
 bounce_sm_packet({_, Packet} = Acc) ->
-    ?DEBUG("dropping packet to unavailable resource:~n~s",
+    ?DEBUG("Dropping packet to unavailable resource:~n~s",
           [xmpp:pp(Packet)]),
     Acc.
 
@@ -491,7 +491,7 @@ handle_info({route, Packet}, State) ->
     route(Packet),
     {noreply, State};
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
@@ -633,23 +633,23 @@ do_route(#jid{lresource = <<"">>} = To, Term) ->
              do_route(jid:replace_resource(To, R), Term)
       end, get_user_resources(To#jid.user, To#jid.server));
 do_route(To, Term) ->
-    ?DEBUG("broadcasting ~p to ~s", [Term, jid:encode(To)]),
+    ?DEBUG("Broadcasting ~p to ~s", [Term, jid:encode(To)]),
     {U, S, R} = jid:tolower(To),
     Mod = get_sm_backend(S),
     case get_sessions(Mod, U, S, R) of
        [] ->
-           ?DEBUG("dropping broadcast to unavailable resourse: ~p", [Term]);
+           ?DEBUG("Dropping broadcast to unavailable resourse: ~p", [Term]);
        Ss ->
            Session = lists:max(Ss),
            Pid = element(2, Session#session.sid),
-           ?DEBUG("sending to process ~p: ~p", [Pid, Term]),
+           ?DEBUG("Sending to process ~p: ~p", [Pid, Term]),
            ejabberd_c2s:route(Pid, Term)
     end.
 
 -spec do_route(stanza()) -> any().
 do_route(#presence{to = To, type = T} = Packet)
   when T == subscribe; T == subscribed; T == unsubscribe; T == unsubscribed ->
-    ?DEBUG("processing subscription:~n~s", [xmpp:pp(Packet)]),
+    ?DEBUG("Processing subscription:~n~s", [xmpp:pp(Packet)]),
     #jid{luser = LUser, lserver = LServer} = To,
     case is_privacy_allow(Packet) andalso
        ejabberd_hooks:run_fold(
@@ -662,7 +662,7 @@ do_route(#presence{to = To, type = T} = Packet)
                           priority = Prio}) when is_integer(Prio) ->
                      Pid = element(2, SID),
                      Packet1 = Packet#presence{to = jid:replace_resource(To, R)},
-                     ?DEBUG("sending to process ~p:~n~s",
+                     ?DEBUG("Sending to process ~p:~n~s",
                             [Pid, xmpp:pp(Packet1)]),
                      ejabberd_c2s:route(Pid, {route, Packet1});
                 (_) ->
@@ -672,14 +672,14 @@ do_route(#presence{to = To, type = T} = Packet)
            ok
     end;
 do_route(#presence{to = #jid{lresource = <<"">>} = To} = Packet) ->
-    ?DEBUG("processing presence to bare JID:~n~s", [xmpp:pp(Packet)]),
+    ?DEBUG("Processing presence to bare JID:~n~s", [xmpp:pp(Packet)]),
     {LUser, LServer, _} = jid:tolower(To),
     lists:foreach(
       fun({_, R}) ->
              do_route(Packet#presence{to = jid:replace_resource(To, R)})
       end, get_user_present_resources(LUser, LServer));
 do_route(#message{to = #jid{lresource = <<"">>} = To, type = T} = Packet) ->
-    ?DEBUG("processing message to bare JID:~n~s", [xmpp:pp(Packet)]),
+    ?DEBUG("Processing message to bare JID:~n~s", [xmpp:pp(Packet)]),
     if T == chat; T == headline; T == normal ->
            route_message(Packet);
        true ->
@@ -688,14 +688,14 @@ do_route(#message{to = #jid{lresource = <<"">>} = To, type = T} = Packet) ->
     end;
 do_route(#iq{to = #jid{lresource = <<"">>} = To, type = T} = Packet) ->
     if T == set; T == get ->
-           ?DEBUG("processing IQ to bare JID:~n~s", [xmpp:pp(Packet)]),
+           ?DEBUG("Processing IQ to bare JID:~n~s", [xmpp:pp(Packet)]),
            gen_iq_handler:handle(?MODULE, Packet);
        true ->
            ejabberd_hooks:run_fold(bounce_sm_packet,
                                    To#jid.lserver, {pass, Packet}, [])
     end;
 do_route(Packet) ->
-    ?DEBUG("processing packet to full JID:~n~s", [xmpp:pp(Packet)]),
+    ?DEBUG("Processing packet to full JID:~n~s", [xmpp:pp(Packet)]),
     To = xmpp:get_to(Packet),
     {LUser, LServer, LResource} = jid:tolower(To),
     Mod = get_sm_backend(LServer),
@@ -717,7 +717,7 @@ do_route(Packet) ->
        Ss ->
            Session = lists:max(Ss),
            Pid = element(2, Session#session.sid),
-           ?DEBUG("sending to process ~p:~n~s", [Pid, xmpp:pp(Packet)]),
+           ?DEBUG("Sending to process ~p:~n~s", [Pid, xmpp:pp(Packet)]),
            ejabberd_c2s:route(Pid, {route, Packet})
     end.
 
@@ -752,7 +752,7 @@ route_message(#message{to = To, type = Type} = Packet) ->
                                  Ss ->
                                      Session = lists:max(Ss),
                                      Pid = element(2, Session#session.sid),
-                                     ?DEBUG("sending to process ~p~n", [Pid]),
+                                     ?DEBUG("Sending to process ~p~n", [Pid]),
                                      LMaxRes = jid:resourceprep(MaxRes),
                                      Packet1 = maybe_mark_as_copy(Packet,
                                                                   LResource,
index e4bab3902029487870ec25446d7334c1a0266c63..67e7701c6ef17ef200aad8f91d055128209ded95 100644 (file)
@@ -160,11 +160,11 @@ handle_info({redis_message, ?SM_KEY, Data}, State) ->
        {delete, Key} ->
            ets_cache:delete(?SM_CACHE, Key);
        Msg ->
-           ?WARNING_MSG("unexpected redis message: ~p", [Msg])
+           ?WARNING_MSG("Unexpected redis message: ~p", [Msg])
     end,
     {noreply, State};
 handle_info(Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
index 71defb06ce4f6bd6620b732f643087c3c54230e7..2a048f006859b14db7c07a75dda9bcb891385f19 100644 (file)
@@ -53,7 +53,7 @@ init() ->
                  {updated, _} ->
                      ok;
                  Err ->
-                     ?ERROR_MSG("failed to clean 'sm' table: ~p", [Err]),
+                     ?ERROR_MSG("Failed to clean 'sm' table: ~p", [Err]),
                      {error, db_failure}
              end;
         (_, Err) ->
index c7c2d2d4df02394024834d5546e70de4cdf5acc2..6ebf023e76368c8a2c13c898931f984018c7a1c8 100644 (file)
@@ -169,7 +169,7 @@ keep_alive(Host, PID) ->
        {selected,_,[[<<"1">>]]} ->
            ok;
        _Err ->
-           ?ERROR_MSG("keep alive query failed, closing connection: ~p", [_Err]),
+           ?ERROR_MSG("Keep alive query failed, closing connection: ~p", [_Err]),
            sync_send_event(PID, force_timeout, query_timeout(Host))
     end.
 
@@ -364,7 +364,7 @@ connecting(connect, #state{host = Host} = State) ->
          {next_state, connecting, State}
     end;
 connecting(Event, State) ->
-    ?WARNING_MSG("unexpected event in 'connecting': ~p",
+    ?WARNING_MSG("Unexpected event in 'connecting': ~p",
                 [Event]),
     {next_state, connecting, State}.
 
@@ -376,7 +376,7 @@ connecting({sql_cmd, {sql_query, ?KEEPALIVE_QUERY},
     {next_state, connecting, State};
 connecting({sql_cmd, Command, Timestamp} = Req, From,
           State) ->
-    ?DEBUG("queuing pending request while connecting:~n\t~p",
+    ?DEBUG("Queuing pending request while connecting:~n\t~p",
           [Req]),
     PendingRequests =
        try p1_queue:in({sql_cmd, Command, From, Timestamp},
@@ -393,7 +393,7 @@ connecting({sql_cmd, Command, Timestamp} = Req, From,
     {next_state, connecting,
      State#state{pending_requests = PendingRequests}};
 connecting(Request, {Who, _Ref}, State) ->
-    ?WARNING_MSG("unexpected call ~p from ~p in 'connecting'",
+    ?WARNING_MSG("Unexpected call ~p from ~p in 'connecting'",
                 [Request, Who]),
     {reply, {error, badarg}, connecting, State}.
 
@@ -401,7 +401,7 @@ session_established({sql_cmd, Command, Timestamp}, From,
                    State) ->
     run_sql_cmd(Command, From, State, Timestamp);
 session_established(Request, {Who, _Ref}, State) ->
-    ?WARNING_MSG("unexpected call ~p from ~p in 'session_establ"
+    ?WARNING_MSG("Unexpected call ~p from ~p in 'session_establ"
                 "ished'",
                 [Request, Who]),
     {reply, {error, badarg}, session_established, State}.
@@ -412,7 +412,7 @@ session_established({sql_cmd, Command, From, Timestamp},
 session_established(force_timeout, State) ->
     {stop, timeout, State};
 session_established(Event, State) ->
-    ?WARNING_MSG("unexpected event in 'session_established': ~p",
+    ?WARNING_MSG("Unexpected event in 'session_established': ~p",
                 [Event]),
     {next_state, session_established, State}.
 
@@ -432,7 +432,7 @@ handle_info({'DOWN', _MonitorRef, process, _Pid, _Info},
     p1_fsm:send_event(self(), connect),
     {next_state, connecting, State};
 handle_info(Info, StateName, State) ->
-    ?WARNING_MSG("unexpected info in ~p: ~p",
+    ?WARNING_MSG("Unexpected info in ~p: ~p",
                 [StateName, Info]),
     {next_state, StateName, State}.
 
@@ -496,7 +496,7 @@ inner_transaction(F) ->
     case get(?NESTING_KEY) of
       ?TOP_LEVEL_TXN ->
          {backtrace, T} = process_info(self(), backtrace),
-         ?ERROR_MSG("inner transaction called at outer txn "
+         ?ERROR_MSG("Inner transaction called at outer txn "
                     "level. Trace: ~s",
                     [T]),
          erlang:exit(implementation_faulty);
@@ -518,7 +518,7 @@ outer_transaction(F, NRestarts, _Reason) ->
       ?TOP_LEVEL_TXN -> ok;
       _N ->
          {backtrace, T} = process_info(self(), backtrace),
-         ?ERROR_MSG("outer transaction called at inner txn "
+         ?ERROR_MSG("Outer transaction called at inner txn "
                     "level. Trace: ~s",
                     [T]),
          erlang:exit(implementation_faulty)
@@ -965,11 +965,11 @@ get_db_version(#state{db_type = pgsql} = State) ->
                 Version when is_integer(Version) ->
                     State#state{db_version = Version};
                 Error ->
-                    ?WARNING_MSG("error getting pgsql version: ~p", [Error]),
+                    ?WARNING_MSG("Error getting pgsql version: ~p", [Error]),
                     State
             end;
         Res ->
-            ?WARNING_MSG("error getting pgsql version: ~p", [Res]),
+            ?WARNING_MSG("Error getting pgsql version: ~p", [Res]),
             State
     end;
 get_db_version(State) ->
@@ -1092,12 +1092,12 @@ init_mssql(Host) ->
                os:putenv("FREETDSCONF", freetds_config()),
                ok
            catch error:{badmatch, {error, Reason} = Err} ->
-                   ?ERROR_MSG("failed to create temporary files in ~s: ~s",
+                   ?ERROR_MSG("Failed to create temporary files in ~s: ~s",
                               [tmp_dir(), file:format_error(Reason)]),
                    Err
            end;
        {error, Reason} = Err ->
-           ?ERROR_MSG("failed to create temporary directory ~s: ~s",
+           ?ERROR_MSG("Failed to create temporary directory ~s: ~s",
                       [tmp_dir(), file:format_error(Reason)]),
            Err
     end.
index b5553ec401147d36122b9a082bec74dbbf1069d2..fc16b784b0c04f887c9ca179e9c07fe9939c4006 100644 (file)
@@ -118,7 +118,7 @@ remove_pid(Host, Pid) ->
 get_pool_size(SQLType, Host) ->
     PoolSize = ejabberd_option:sql_pool_size(Host),
     if PoolSize > 1 andalso SQLType == sqlite ->
-           ?WARNING_MSG("it's not recommended to set sql_pool_size > 1 for "
+           ?WARNING_MSG("It's not recommended to set sql_pool_size > 1 for "
                         "sqlite, because it may cause race conditions", []);
        true ->
            ok
index c7aa652c1b572239b8ded8bc6ebe7b80267b1e10..fad9ce5b854ecbae33dd9f1529515bba8d49eb9e 100644 (file)
@@ -43,7 +43,7 @@ update() ->
                eval_script(
                  LowLevelScript, [],
                  [{ejabberd, "", filename:join(Dir, "..")}]),
-           ?DEBUG("eval: ~p~n", [Eval]),
+           ?DEBUG("Eval: ~p~n", [Eval]),
            Eval;
        {error, Reason} ->
            {error, Reason}
@@ -60,7 +60,7 @@ update(ModulesToUpdate) ->
                eval_script(
                  LowLevelScript, [],
                  [{ejabberd, "", filename:join(Dir, "..")}]),
-           ?DEBUG("eval: ~p~n", [Eval]),
+           ?DEBUG("Eval: ~p~n", [Eval]),
            Eval;
        {error, Reason} ->
            {error, Reason}
@@ -86,7 +86,7 @@ update_info() ->
 update_info(Dir, Files) ->
     Beams = lists:sort(get_beams(Files)),
     UpdatedBeams = get_updated_beams(Beams),
-    ?DEBUG("beam files: ~p~n", [UpdatedBeams]),
+    ?DEBUG("BEAM files: ~p~n", [UpdatedBeams]),
     {Script, LowLevelScript, Check} = build_script(Dir, UpdatedBeams),
     {ok, Dir, UpdatedBeams, Script, LowLevelScript, Check}.
 
@@ -135,46 +135,46 @@ build_script(Dir, UpdatedBeams) ->
          [{ejabberd, "", filename:join(Dir, "..")}]),
     Check1 = case Check of
        {ok, []} ->
-           ?DEBUG("script: ~p~n", [Script]),
-           ?DEBUG("low level script: ~p~n", [LowLevelScript]),
-           ?DEBUG("check: ~p~n", [Check]),
+           ?DEBUG("Script: ~p~n", [Script]),
+           ?DEBUG("Low level script: ~p~n", [LowLevelScript]),
+           ?DEBUG("Check: ~p~n", [Check]),
            ok;
        _ ->
-           ?ERROR_MSG("script: ~p~n", [Script]),
-           ?ERROR_MSG("low level script: ~p~n", [LowLevelScript]),
-           ?ERROR_MSG("check: ~p~n", [Check]),
+           ?ERROR_MSG("Script: ~p~n", [Script]),
+           ?ERROR_MSG("Low level script: ~p~n", [LowLevelScript]),
+           ?ERROR_MSG("Check: ~p~n", [Check]),
            error
     end,
     {Script, LowLevelScript, Check1}.
 
 %% Copied from Erlang/OTP file: lib/sasl/src/systools.hrl
--record(application, 
+-record(application,
        {name,                  %% Name of the application, atom().
          type = permanent,     %% Application start type, atom().
         vsn = "",              %% Version of the application, string().
         id = "",               %% Id of the application, string().
         description = "",      %% Description of application, string().
-        modules = [],          %% [Module | {Module,Vsn}] of modules 
-                               %% incorporated in the application, 
+        modules = [],          %% [Module | {Module,Vsn}] of modules
+                               %% incorporated in the application,
                                %% Module = atom(), Vsn = string().
         uses = [],             %% [Application] list of applications required
                                %% by the application, Application = atom().
         includes = [],         %% [Application] list of applications included
                                %% by the application, Application = atom().
-        regs = [],             %% [RegNames] a list of registered process 
+        regs = [],             %% [RegNames] a list of registered process
                                %% names used by the application, RegNames =
                                %% atom().
-        env = [],              %% [{Key,Value}] environment variable of 
+        env = [],              %% [{Key,Value}] environment variable of
                                %% application, Key = Value = term().
-        maxT = infinity,       %% Max time an application may exist, 
+        maxT = infinity,       %% Max time an application may exist,
                                %% integer() | infinity.
         maxP = infinity,       %% Max number of processes in an application,
                                %% integer() | infinity.
-        mod = [],              %% [] | {Mod, StartArgs}, Mod= atom(), 
+        mod = [],              %% [] | {Mod, StartArgs}, Mod= atom(),
                                %% StartArgs = list().
         start_phases = [],     %% [] | {Phase, PhaseArgs}, Phase = atom(),
                                %% PhaseArgs = list().
-         dir = ""              %% The directory where the .app file was 
+         dir = ""              %% The directory where the .app file was
                                %% found (internal use).
        }).
 
index c50d51bb90c9919dbc435bb59a14b72023c93eba..89a900a2fd58ca20e9cac8ef73f6d5fdf287ea2a 100644 (file)
@@ -463,7 +463,7 @@ process_admin(Host, #request{path = [<<"online-users">>],
 process_admin(Host, #request{path = [<<"last-activity">>],
                             q = Query, lang = Lang}, AJID)
     when is_binary(Host) ->
-    ?DEBUG("query: ~p", [Query]),
+    ?DEBUG("Query: ~p", [Query]),
     Month = case lists:keysearch(<<"period">>, 1, Query) of
              {value, {_, Val}} -> Val;
              _ -> <<"month">>
index 1767a1603f2ffbf2a5dd9a17417a628044f7251a..82443eec5aa28ea043a67e0d4522a14d92e33b46 100644 (file)
@@ -192,7 +192,7 @@ ws_loop(FrameInfo, Socket, WsHandleLoopPid, SocketMode) ->
         {DataType, _Socket, Data} when DataType =:= tcp orelse DataType =:= raw ->
             case handle_data(DataType, FrameInfo, Data, Socket, WsHandleLoopPid, SocketMode) of
                 {error, Error} ->
-                    ?DEBUG("tls decode error ~p", [Error]),
+                    ?DEBUG("TLS decode error ~p", [Error]),
                     websocket_close(Socket, WsHandleLoopPid, SocketMode, 1002); % protocol error
                 {NewFrameInfo, ToSend} ->
                     lists:foreach(fun(Pkt) -> SocketMode:send(Socket, Pkt)
@@ -200,17 +200,17 @@ ws_loop(FrameInfo, Socket, WsHandleLoopPid, SocketMode) ->
                     ws_loop(NewFrameInfo, Socket, WsHandleLoopPid, SocketMode)
             end;
         {tcp_closed, _Socket} ->
-            ?DEBUG("tcp connection was closed, exit", []),
+            ?DEBUG("TCP connection was closed, exit", []),
             websocket_close(Socket, WsHandleLoopPid, SocketMode, 0);
        {tcp_error, Socket, Reason} ->
-           ?DEBUG("tcp connection error: ~s", [inet:format_error(Reason)]),
+           ?DEBUG("TCP connection error: ~s", [inet:format_error(Reason)]),
            websocket_close(Socket, WsHandleLoopPid, SocketMode, 0);
         {'DOWN', Ref, process, WsHandleLoopPid, Reason} ->
             Code = case Reason of
                        normal ->
                            1000; % normal close
                        _ ->
-                           ?ERROR_MSG("linked websocket controlling loop crashed "
+                           ?ERROR_MSG("Linked websocket controlling loop crashed "
                                       "with reason: ~p",
                                       [Reason]),
                            1011 % internal error
@@ -230,12 +230,12 @@ ws_loop(FrameInfo, Socket, WsHandleLoopPid, SocketMode) ->
             ws_loop(FrameInfo, Socket, WsHandleLoopPid,
                     SocketMode);
         shutdown ->
-         ?DEBUG("shutdown request received, closing websocket "
+         ?DEBUG("Shutdown request received, closing websocket "
                 "with pid ~p",
                 [self()]),
             websocket_close(Socket, WsHandleLoopPid, SocketMode, 1001); % going away
         _Ignored ->
-            ?WARNING_MSG("received unexpected message, ignoring: ~p",
+            ?WARNING_MSG("Received unexpected message, ignoring: ~p",
                          [_Ignored]),
             ws_loop(FrameInfo, Socket, WsHandleLoopPid,
                     SocketMode)
index 5b26d07b036cf9b67c286b0d67969b366f793ca5..1a8128ae9735496ca94a4760373ec561dcf0237e 100644 (file)
@@ -220,7 +220,7 @@ process(_, #request{method = 'POST', data = Data, opts = Opts, ip = {IP, _}}) ->
                     #xmlel{name = <<"h1">>, attrs = [],
                            children = [{xmlcdata, <<"Malformed Request">>}]}};
                {ok, RPC} ->
-                   ?DEBUG("got XML-RPC request: ~p", [RPC]),
+                   ?DEBUG("Got XML-RPC request: ~p", [RPC]),
                    {false, Result} = handler(State, RPC),
                    XML = fxml:element_to_binary(fxmlrpc:encode(Result)),
                    {200, [{<<"Content-Type">>, <<"text/xml">>}],
@@ -486,7 +486,7 @@ format_arg(Arg, string) when is_binary(Arg) -> binary_to_list(Arg);
 format_arg(undefined, binary) -> <<>>;
 format_arg(undefined, string) -> "";
 format_arg(Arg, Format) ->
-    ?ERROR_MSG("don't know how to format Arg ~p for format ~p", [Arg, Format]),
+    ?ERROR_MSG("Don't know how to format Arg ~p for format ~p", [Arg, Format]),
     exit({invalid_arg_type, Arg, Format}).
 
 process_unicode_codepoints(Str) ->
index 546b868792cf70a71b3122708ef2908e6291128a..42c4e83f537dbd536453680f8fce92a5d1ad9022 100644 (file)
@@ -114,7 +114,7 @@ delete(Server, Module) ->
 import(Server, Dir, ToType) ->
     lists:foreach(
       fun(Mod) ->
-              ?INFO_MSG("importing ~p...", [Mod]),
+              ?INFO_MSG("Importing ~p...", [Mod]),
               import(Mod, Server, Dir, ToType)
       end, modules()).
 
index 760f2557bd9a70e6b6a93dc2fc7b189975b6c054..fb55837e5a4d77f7b0843cc3c6aaa8ec86fc1c9f 100644 (file)
@@ -6,7 +6,7 @@
 %%%           draft-ietf-asid-ldap-c-api-00.txt
 %%%
 %%% Copyright (C) 2000  Torbjorn Tornkvist, tnt@home.se
-%%% 
+%%%
 %%%
 %%% This program is free software; you can redistribute it and/or modify
 %%% it under the terms of the GNU General Public License as published by
@@ -181,7 +181,7 @@ close(Handle) ->
 %%% to succeed. The parent of the entry MUST exist.
 %%% Example:
 %%%
-%%%  add(Handle, 
+%%%  add(Handle,
 %%%         "cn=Bill Valentine, ou=people, o=Bluetail AB, dc=bluetail, dc=com",
 %%%         [{"objectclass", ["person"]},
 %%%          {"cn", ["Bill Valentine"]},
@@ -205,11 +205,11 @@ add_attrs(Attrs) ->
     end.
 
 %%% --------------------------------------------------------------------
-%%% Delete an entry. The entry consists of the DN of 
+%%% Delete an entry. The entry consists of the DN of
 %%% the entry to be deleted.
 %%% Example:
 %%%
-%%%  delete(Handle, 
+%%%  delete(Handle,
 %%%         "cn=Bill Valentine, ou=people, o=Bluetail AB, dc=bluetail, dc=com"
 %%%        )
 %%% --------------------------------------------------------------------
@@ -223,10 +223,10 @@ delete(Handle, Entry) ->
 %%% operations can be performed as one atomic operation.
 %%% Example:
 %%%
-%%%  modify(Handle, 
+%%%  modify(Handle,
 %%%         "cn=Torbjorn Tornkvist, ou=people, o=Bluetail AB, dc=bluetail, dc=com",
 %%%         [replace("telephoneNumber", ["555 555 00"]),
-%%%          add("description", ["LDAP hacker"])] 
+%%%          add("description", ["LDAP hacker"])]
 %%%        )
 %%% --------------------------------------------------------------------
 -spec modify(handle(), any(), [add | delete | replace]) -> any().
@@ -237,7 +237,7 @@ modify(Handle, Object, Mods) ->
                            ?CALL_TIMEOUT).
 
 %%%
-%%% Modification operations. 
+%%% Modification operations.
 %%% Example:
 %%%            replace("telephoneNumber", ["555 555 00"])
 %%%
@@ -252,7 +252,7 @@ mod_delete(Type, Values) ->
 %%% operations can be performed as one atomic operation.
 %%% Example:
 %%%
-%%%  modify_dn(Handle, 
+%%%  modify_dn(Handle,
 %%%    "cn=Bill Valentine, ou=people, o=Bluetail AB, dc=bluetail, dc=com",
 %%%    "cn=Ben Emerson",
 %%%    true,
@@ -289,12 +289,12 @@ modify_passwd(Handle, DN, Passwd) ->
 %%% Bind.
 %%% Example:
 %%%
-%%%  bind(Handle, 
+%%%  bind(Handle,
 %%%    "cn=Bill Valentine, ou=people, o=Bluetail AB, dc=bluetail, dc=com",
 %%%    "secret")
 %%% --------------------------------------------------------------------
 -spec bind(handle(), binary(), binary()) -> any().
+
 bind(Handle, RootDN, Passwd) ->
     Handle1 = get_handle(Handle),
     p1_fsm:sync_send_event(Handle1, {bind, RootDN, Passwd},
@@ -308,7 +308,7 @@ optional([]) -> asn1_NOVALUE;
 optional(Value) -> Value.
 
 %%% --------------------------------------------------------------------
-%%% Synchronous search of the Directory returning a 
+%%% Synchronous search of the Directory returning a
 %%% requested set of attributes.
 %%%
 %%%  Example:
@@ -560,9 +560,9 @@ get_handle(Name) when is_binary(Name) ->
 %% Returns: {ok, StateName, StateData}          |
 %%          {ok, StateName, StateData, Timeout} |
 %%          ignore                              |
-%%          {stop, StopReason}             
+%%          {stop, StopReason}
 %% I use the trick of setting a timeout of 0 to pass control into the
-%% process.      
+%% process.
 %%----------------------------------------------------------------------
 init([Hosts, Port, Rootdn, Passwd, Opts]) ->
     Encrypt = case proplists:get_value(encrypt, Opts) of
@@ -639,7 +639,7 @@ active(Event, From, S) ->
 %% Called when p1_fsm:send_all_state_event/2 is invoked.
 %% Returns: {next_state, NextStateName, NextStateData}          |
 %%          {next_state, NextStateName, NextStateData, Timeout} |
-%%          {stop, Reason, NewStateData}                         
+%%          {stop, Reason, NewStateData}
 %%----------------------------------------------------------------------
 handle_event(close, _StateName, S) ->
     catch (S#eldap.sockmod):close(S#eldap.fd),
@@ -655,7 +655,7 @@ handle_sync_event(_Event, _From, StateName, S) ->
 %%
 handle_info({Tag, _Socket, Data}, connecting, S)
     when Tag == tcp; Tag == ssl ->
-    ?DEBUG("tcp packet received when disconnected!~n~p", [Data]),
+    ?DEBUG("TCP packet received when disconnected!~n~p", [Data]),
     {next_state, connecting, S};
 handle_info({Tag, _Socket, Data}, wait_bind_response, S)
     when Tag == tcp; Tag == ssl ->
@@ -721,7 +721,7 @@ handle_info({timeout, _Timer, bind_timeout}, wait_bind_response, S) ->
 %% Make sure we don't fill the message queue with rubbish
 %%
 handle_info(Info, StateName, S) ->
-    ?DEBUG("eldap. Unexpected Info: ~p~nIn state: "
+    ?DEBUG("Unexpected Info: ~p~nIn state: "
           "~p~n when StateData is: ~p",
           [Info, StateName, S]),
     {next_state, StateName, S}.
@@ -822,7 +822,7 @@ gen_req({bind, RootDN, Passwd}) ->
 %% recvd_packet
 %% Deals with incoming packets in the active state
 %% Will return one of:
-%%  {ok, NewS} - Don't reply to client yet as this is part of a search 
+%%  {ok, NewS} - Don't reply to client yet as this is part of a search
 %%               result and we haven't got all the answers yet.
 %%  {reply, Result, From, NewS} - Reply with result to client From
 %%  {error, Reason}
index c0b7a9dd449c5f454eb41e0ec5c37a7b025bc3f7..87fb62c06ca7c517e5f5e752fd1deca7f8dcba67 100644 (file)
@@ -112,7 +112,7 @@ process_iq(_Host, Module, Function, IQ) ->
        ignore ->
            ok
     catch ?EX_RULE(E, R, St) ->
-           ?ERROR_MSG("failed to process iq:~n~s~nReason = ~p",
+           ?ERROR_MSG("Failed to process iq:~n~s~nReason = ~p",
                       [xmpp:pp(IQ), {E, {R, ?EX_STACK(St)}}]),
            Txt = ?T("Module failed to handle the query"),
            Err = xmpp:err_internal_server_error(Txt, IQ#iq.lang),
index 0122a7f2d0f1624867ace6fe969de665b6aef27d..46224dea53f0fd55b1a7fe84e1b9ff901afa89f6 100644 (file)
@@ -144,7 +144,7 @@ xdb_data(User, Server, #xmlel{attrs = Attrs} = El) ->
                        From,
                        [{XMLNS, El#xmlel{attrs = NewAttrs}}]);
            _ ->
-               ?DEBUG("jd2ejd: Unknown namespace \"~s\"~n", [XMLNS])
+               ?DEBUG("Unknown namespace \"~s\"~n", [XMLNS])
          end,
          ok
     end.
@@ -166,7 +166,7 @@ process_offline(Server, To, #xmlel{children = Els}) ->
                      ok
              catch _:{xmpp_codec, Why} ->
                      Txt = xmpp:format_error(Why),
-                     ?ERROR_MSG("failed to decode XML '~s': ~s",
+                     ?ERROR_MSG("Failed to decode XML '~s': ~s",
                                 [fxml:element_to_binary(El), Txt])
              end
       end, Els).
index abfc1c3b65f19127c1d6c68034f0e8bec49bd67d..5de3a96c9171b9db36f54496b94b339339e201aa 100644 (file)
@@ -849,7 +849,7 @@ check_password_hash(User, Host, PasswordHash, HashMethod) ->
                          {A, _} when is_tuple(A) -> scrammed;
                          {_, true} -> get_hash(AccountPass, HashMethod);
                          {_, false} ->
-                             ?ERROR_MSG("check_password_hash called "
+                             ?ERROR_MSG("Check_password_hash called "
                                         "with hash method: ~p", [HashMethod]),
                              undefined
                      end,
index 69251e665a6faa176bec397f1b118d9a26584d82..bdd2751b78763b0f17dc897c58d2b61d0bbfc0d2 100644 (file)
@@ -143,12 +143,12 @@ handle_cast({F, #message{from = From, to = To} = Pkt}, State) when is_atom(F) ->
     end,
     {noreply, State};
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, #state{host = Host}) ->
@@ -597,7 +597,7 @@ handle_adhoc_form(From, #jid{lserver = LServer} = To,
        Junk ->
            %% This can't happen, as we haven't registered any other
            %% command nodes.
-           ?ERROR_MSG("got unexpected node/body = ~p", [Junk]),
+           ?ERROR_MSG("Unexpected node/body = ~p", [Junk]),
            {error, xmpp:err_internal_server_error()}
     end.
 
@@ -722,7 +722,7 @@ send_motd({#presence{type = available},
                            ok
                    end
            catch _:{xmpp_codec, Why} ->
-                   ?ERROR_MSG("failed to decode motd packet ~p: ~s",
+                   ?ERROR_MSG("Failed to decode motd packet ~p: ~s",
                               [Packet, xmpp:format_error(Why)])
            end;
        _ ->
@@ -806,7 +806,7 @@ get_stored_motd(LServer) ->
                #message{body = Body, subject = Subject} ->
                    {xmpp:get_text(Subject), xmpp:get_text(Body)}
            catch _:{xmpp_codec, Why} ->
-                   ?ERROR_MSG("failed to decode motd packet ~p: ~s",
+                   ?ERROR_MSG("Failed to decode motd packet ~p: ~s",
                               [Packet, xmpp:format_error(Why)])
            end;
         _ ->
index dc05afe20cf4de3e984f8498a19b4609e2b411e5..778888d1494dd9fbb6d3582c7a21cd6e2ffe3c4f 100644 (file)
@@ -154,7 +154,7 @@ parse_element(XML) ->
         El when is_record(El, xmlel) ->
             {ok, El};
         _ ->
-            ?ERROR_MSG("malformed XML element in SQL table "
+            ?ERROR_MSG("Malformed XML element in SQL table "
                        "'motd' for username='': ~s", [XML]),
             {error, db_failure}
     end.
index 2dd0adbc2ef9f12ed03e77a0a1347c27ec4ffeac..67f0aef200be5c47d521fe6ec216814743c3180a 100644 (file)
@@ -95,11 +95,11 @@ pubsub_publish_item(LServer, ?NS_AVATAR_METADATA,
                    set_vcard_avatar(From, Photo, #{})
            end;
        _ ->
-           ?WARNING_MSG("invalid avatar metadata of ~s@~s published "
+           ?WARNING_MSG("Invalid avatar metadata of ~s@~s published "
                         "with item id ~s",
                         [LUser, LServer, ItemId])
     catch _:{xmpp_codec, Why} ->
-           ?WARNING_MSG("failed to decode avatar metadata of ~s@~s: ~s",
+           ?WARNING_MSG("Failed to decode avatar metadata of ~s@~s: ~s",
                         [LUser, LServer, xmpp:format_error(Why)])
     end;
 pubsub_publish_item(_, _, _, _, _, _) ->
@@ -208,12 +208,12 @@ get_avatar_data(JID, ItemID) ->
                #avatar_data{data = Data} ->
                    {ok, Data};
                _ ->
-                   ?WARNING_MSG("invalid avatar data detected "
+                   ?WARNING_MSG("Invalid avatar data detected "
                                 "for ~s@~s with item id ~s",
                                 [LUser, LServer, ItemID]),
                    {error, invalid_data}
            catch _:{xmpp_codec, Why} ->
-                   ?WARNING_MSG("failed to decode avatar data for "
+                   ?WARNING_MSG("Failed to decode avatar data for "
                                 "~s@~s with item id ~s: ~s",
                                 [LUser, LServer, ItemID,
                                  xmpp:format_error(Why)]),
@@ -227,7 +227,7 @@ get_avatar_data(JID, ItemID) ->
        {error, #stanza_error{reason = 'item-not-found'}} ->
            {error, notfound};
        {error, Reason} ->
-           ?WARNING_MSG("failed to get item for ~s@~s at node ~s "
+           ?WARNING_MSG("Failed to get item for ~s@~s at node ~s "
                         "with item id ~s: ~p",
                         [LUser, LServer, ?NS_AVATAR_METADATA, ItemID, Reason]),
            {error, internal_error}
@@ -246,12 +246,12 @@ get_avatar_meta(#iq{from = JID}) ->
                #avatar_meta{} = Meta ->
                    {ok, ItemID, Meta};
                _ ->
-                   ?WARNING_MSG("invalid metadata payload detected "
+                   ?WARNING_MSG("Invalid metadata payload detected "
                                 "for ~s@~s with item id ~s",
                                 [LUser, LServer, ItemID]),
                    {error, invalid_metadata}
            catch _:{xmpp_codec, Why} ->
-                   ?WARNING_MSG("failed to decode metadata for "
+                   ?WARNING_MSG("Failed to decode metadata for "
                                 "~s@~s with item id ~s: ~s",
                                 [LUser, LServer, ItemID,
                                  xmpp:format_error(Why)]),
@@ -260,7 +260,7 @@ get_avatar_meta(#iq{from = JID}) ->
        {error, #stanza_error{reason = 'item-not-found'}} ->
            {error, notfound};
        {error, Reason} ->
-           ?WARNING_MSG("failed to get items for ~s@~s at node ~s: ~p",
+           ?WARNING_MSG("Failed to get items for ~s@~s at node ~s: ~p",
                         [LUser, LServer, ?NS_AVATAR_METADATA, Reason]),
            {error, internal_error}
     end.
@@ -392,11 +392,11 @@ get_vcard(#jid{luser = LUser, lserver = LServer}) ->
        #vcard_temp{} = VCard ->
            {ok, VCard};
        _ ->
-           ?ERROR_MSG("invalid vCard of ~s@~s in the database",
+           ?ERROR_MSG("Invalid vCard of ~s@~s in the database",
                       [LUser, LServer]),
            {error, invalid_vcard}
     catch _:{xmpp_codec, Why} ->
-           ?ERROR_MSG("failed to decode vCard of ~s@~s: ~s",
+           ?ERROR_MSG("Failed to decode vCard of ~s@~s: ~s",
                       [LUser, LServer, xmpp:format_error(Why)]),
            {error, invalid_vcard}
     end.
index 4547d58bd9f312874f0a051bdb0d6d0489dac3a8..824e06b551427dc6027b9d7c879b2bcf9352bef6 100644 (file)
@@ -116,7 +116,7 @@ handle_info({delete, Session}, State) ->
     delete_session(Session),
     {noreply, State};
 handle_info(_Info, State) ->
-    ?ERROR_MSG("got unexpected info: ~p", [_Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [_Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
index b94322194f6df4368bbd6141ce7c12dee042d8f9..c1840604ea2a2081fc846e8587b2aee88fb90785 100644 (file)
@@ -89,7 +89,7 @@ find_session(SID) ->
            try
                {ok, binary_to_term(Pid)}
            catch _:badarg ->
-                   ?ERROR_MSG("malformed data in redis (key = '~s'): ~p",
+                   ?ERROR_MSG("Malformed data in redis (key = '~s'): ~p",
                               [SID, Pid]),
                    {error, db_failure}
            end;
@@ -118,7 +118,7 @@ handle_info({redis_message, ?BOSH_KEY, SID}, State) ->
     ets_cache:delete(?BOSH_CACHE, SID),
     {noreply, State};
 handle_info(Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
@@ -145,5 +145,5 @@ clean_table() ->
              end),
            ok;
        {error, _} ->
-           ?ERROR_MSG("failed to clean bosh sessions in redis", [])
+           ?ERROR_MSG("Failed to clean bosh sessions in redis", [])
     end.
index 08214174718b9f8275fa22b2463db932cbc74d74..4280e83c8c4a16c9832f911ac89bca555cf0c06f 100644 (file)
@@ -66,6 +66,6 @@ clean_table() ->
                      ok
              end, Rs);
        {error, Reason} = Err ->
-           ?ERROR_MSG("failed to clean Riak 'bosh' table: ~p", [Reason]),
+           ?ERROR_MSG("Failed to clean Riak 'bosh' table: ~p", [Reason]),
            Err
     end.
index 328211b839161c71a7de67c404be4d3b653b265c..102372a69834d4f36ad0f65158e77f4e16058cb2 100644 (file)
@@ -44,7 +44,7 @@ init() ->
        {updated, _} ->
            ok;
        Err ->
-           ?ERROR_MSG("failed to clean 'route' table: ~p", [Err]),
+           ?ERROR_MSG("Failed to clean 'route' table: ~p", [Err]),
            Err
     end.
 
index 21f18f10c103cf21ed5753ec540dded4cafb1c35..f1fc0e8f66e971c9cf2670e02f58274d2dad4b51 100644 (file)
@@ -295,7 +295,7 @@ handle_info({iq_reply, IQReply, {Host, From, To, Caps, SubNodes}}, State) ->
     feature_response(IQReply, Host, From, To, Caps, SubNodes),
     {noreply, State};
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, State) ->
index 0009cd619a68d5735625607cdd23bc670614f39d..e83d94d44beba2389e0d7ba2d455e524eaef5e82 100644 (file)
@@ -205,7 +205,7 @@ handle_info({iq_reply, ResIQ, #iq{} = IQ}, State) ->
     process_iq_result(IQ, ResIQ),
     {noreply, State};
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, State) ->
@@ -277,7 +277,7 @@ process_iq_result(#iq{from = From, to = To, id = ID, lang = Lang} = IQ,
                ejabberd_router:route(Reply)
        end
     catch _:_ ->
-           ?ERROR_MSG("got iq-result with invalid delegated "
+           ?ERROR_MSG("Got iq-result with invalid delegated "
                       "payload:~n~s", [xmpp:pp(ResIQ)]),
            Txt = ?T("External component failure"),
            Err = xmpp:err_internal_server_error(Txt, Lang),
index 025d462447eb43eda97e4db2ca66af863f336f0a..eeb9186a6ce3c89d61ff055998097ff0426ff7a9 100644 (file)
@@ -140,11 +140,11 @@ handle_call(_Request, _From, State) ->
     {reply, Reply, State}.
 
 handle_cast(_Msg, State) ->
-    ?ERROR_MSG("got unexpected cast = ~p", [_Msg]),
+    ?ERROR_MSG("Unexpected cast = ~p", [_Msg]),
     {noreply, State}.
 
 handle_info(clean, State) ->
-    ?DEBUG("cleaning ~p ETS table", [failed_auth]),
+    ?DEBUG("Cleaning ~p ETS table", [failed_auth]),
     Now = erlang:system_time(second),
     ets:select_delete(
       failed_auth,
@@ -152,7 +152,7 @@ handle_info(clean, State) ->
     erlang:send_after(?CLEAN_INTERVAL, self(), clean),
     {noreply, State};
 handle_info(_Info, State) ->
-    ?ERROR_MSG("got unexpected info = ~p", [_Info]),
+    ?ERROR_MSG("Unexpected info = ~p", [_Info]),
     {noreply, State}.
 
 terminate(_Reason, #state{host = Host}) ->
index 28228f3e5147a1b56aeb2b1cba4a45b2d3347f99..4dd48158a36efb5416e6065ed52f42343a85cfad 100644 (file)
@@ -400,7 +400,7 @@ format_arg({Elements},
                              _ when TElDef == binary; TElDef == string ->
                                  <<"">>;
                              _ ->
-                                 ?ERROR_MSG("missing field ~p in tuple ~p", [TElName, Elements]),
+                                 ?ERROR_MSG("Missing field ~p in tuple ~p", [TElName, Elements]),
                                  throw({invalid_parameter,
                                         io_lib:format("Missing field ~w in tuple ~w", [TElName, Elements])})
                          end
@@ -418,7 +418,7 @@ format_arg(Arg, string) when is_binary(Arg) -> binary_to_list(Arg);
 format_arg(undefined, binary) -> <<>>;
 format_arg(undefined, string) -> "";
 format_arg(Arg, Format) ->
-    ?ERROR_MSG("don't know how to format Arg ~p for format ~p", [Arg, Format]),
+    ?ERROR_MSG("Don't know how to format Arg ~p for format ~p", [Arg, Format]),
     throw({invalid_parameter,
           io_lib:format("Arg ~w is not in format ~w",
                         [Arg, Format])}).
index fbbd1eebec27ce10f094a9fcef9a189ba323df55..01af8a2a533442691eb60945778ffc1c2b5f2676 100644 (file)
@@ -136,7 +136,7 @@ initialize(Host, Opts) ->
     ContentTypes = build_list_content_types(
                      mod_http_fileserver_opt:content_types(Opts),
                      ?DEFAULT_CONTENT_TYPES),
-    ?DEBUG("known content types: ~s",
+    ?DEBUG("Known content types: ~s",
           [str:join([[$*, K, " -> ", V] || {K, V} <- ContentTypes],
                     <<", ">>)]),
     #state{host = Host,
@@ -222,7 +222,7 @@ handle_cast({reload, Host, NewOpts, _OldOpts}, OldState) ->
            {noreply, OldState}
     end;
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 %%--------------------------------------------------------------------
index 2da64bc845ec12398784bf653864727dbae94b6d..beb164547e9aafe6cedcf17b0a2aac85610b4052 100644 (file)
@@ -300,12 +300,12 @@ handle_call(get_conf, _From,
                   custom_headers = CustomHeaders} = State) ->
     {reply, {ok, DocRoot, CustomHeaders}, State};
 handle_call(Request, From, State) ->
-    ?ERROR_MSG("Got unexpected request from ~p: ~p", [From, Request]),
+    ?ERROR_MSG("Unexpected request from ~p: ~p", [From, Request]),
     {noreply, State}.
 
 -spec handle_cast(_, state()) -> {noreply, state()}.
 handle_cast(Request, State) ->
-    ?ERROR_MSG("Got unexpected request: ~p", [Request]),
+    ?ERROR_MSG("Unexpected request: ~p", [Request]),
     {noreply, State}.
 
 -spec handle_info(timeout | _, state()) -> {noreply, state()}.
@@ -336,7 +336,7 @@ handle_info({timeout, _TRef, Slot}, State) ->
     NewState = del_slot(Slot, State),
     {noreply, NewState};
 handle_info(Info, State) ->
-    ?ERROR_MSG("Got unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 -spec terminate(normal | shutdown | {shutdown, _} | _, state()) -> ok.
@@ -640,7 +640,7 @@ create_slot(#state{service_url = ServiceURL},
                      [jid:encode(JID), ServiceURL]),
            {error, xmpp:err_not_acceptable()};
        {ok, {Code, _Body}} ->
-           ?ERROR_MSG("Got unexpected status code for ~s from <~s>: ~B",
+           ?ERROR_MSG("Unexpected status code for ~s from <~s>: ~B",
                       [jid:encode(JID), ServiceURL, Code]),
            {error, xmpp:err_service_unavailable()};
        {error, Reason} ->
index 4f0d49c0b389e55dbee76b64c367fedd50ac5797..56d46b02ee6495ce7efab19bda4978db6c601019 100644 (file)
@@ -124,7 +124,7 @@ init([ServerHost, Opts]) ->
 
 -spec handle_call(_, {pid(), _}, state()) -> {noreply, state()}.
 handle_call(Request, From, State) ->
-    ?ERROR_MSG("Got unexpected request from ~p: ~p", [From, Request]),
+    ?ERROR_MSG("Unexpected request from ~p: ~p", [From, Request]),
     {noreply, State}.
 
 -spec handle_cast(_, state()) -> {noreply, state()}.
@@ -181,7 +181,7 @@ handle_cast({handle_slot_request, #jid{user = U, server = S} = JID, Path, Size},
                   end,
     {noreply, State#state{disk_usage = NewDiskUsage}};
 handle_cast(Request, State) ->
-    ?ERROR_MSG("Got unexpected request: ~p", [Request]),
+    ?ERROR_MSG("Unexpected request: ~p", [Request]),
     {noreply, State}.
 
 -spec handle_info(_, state()) -> {noreply, state()}.
@@ -207,7 +207,7 @@ handle_info(sweep, #state{server_host = ServerHost,
     end,
     {noreply, State};
 handle_info(Info, State) ->
-    ?ERROR_MSG("Got unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 -spec terminate(normal | shutdown | {shutdown, _} | _, state()) -> ok.
index 8c33aa89cc262f38db83811b62ad1474ec951ec4..9d0460070447d088f163e90d03af45c223d2fe9c 100644 (file)
@@ -173,7 +173,7 @@ get_socket(N) ->
                            get_socket(N-1)
                    end;
                {error, Reason} = Err ->
-                   ?ERROR_MSG("can not open udp socket to grapherl: ~s",
+                   ?ERROR_MSG("Can not open udp socket to grapherl: ~s",
                               [inet:format_error(Reason)]),
                    Err
            end;
index db9a632cae78affd8aecc37a2dc4292d7d1d32c5..f886bc3f981da4d1e55dc44e243f21c8c06f0650 100644 (file)
@@ -186,7 +186,7 @@ handle_call({get_state, Pid}, From, State) ->
             noreply(State3)
     end;
 handle_call(Request, From, State) ->
-    ?WARNING_MSG("Got unexpected call from ~p: ~p", [From, Request]),
+    ?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]),
     noreply(State).
 
 handle_cast(accept, #state{socket = {_, Sock}} = State) ->
@@ -204,7 +204,7 @@ handle_cast(accept, #state{socket = {_, Sock}} = State) ->
            stop(State, {socket, Why})
     end;
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("Got unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     noreply(State).
 
 handle_info(Msg, #state{stop_reason = {resumed, Pid} = Reason} = State) ->
@@ -275,7 +275,7 @@ handle_info({Ref, badarg}, State) when is_reference(Ref) ->
     %% TODO: figure out from where this messages comes from
     noreply(State);
 handle_info(Info, State) ->
-    ?WARNING_MSG("Got unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     noreply(State).
 
 -spec handle_packet(mqtt_packet(), state()) -> {ok, state()} |
@@ -308,7 +308,7 @@ handle_packet(#pubrec{id = ID, code = Code}, State) ->
             {ok, State};
         false ->
             Code1 = 'packet-identifier-not-found',
-            ?DEBUG("Got unexpected PUBREC with id=~B, "
+            ?DEBUG("Unexpected PUBREC with id=~B, "
                    "sending PUBREL with error code '~s'", [ID, Code1]),
             send(State, #pubrel{id = ID, code = Code1})
     end;
@@ -324,7 +324,7 @@ handle_packet(#pubrel{id = ID}, State) ->
             send(State#state{acks = Acks}, #pubcomp{id = ID});
         error ->
             Code = 'packet-identifier-not-found',
-            ?DEBUG("Got unexpected PUBREL with id=~B, "
+            ?DEBUG("Unexpected PUBREL with id=~B, "
                    "sending PUBCOMP with error code '~s'", [ID, Code]),
             Pubcomp = #pubcomp{id = ID, code = Code},
             send(State, Pubcomp)
index 820b09d62c8f94ca7bf9519670b4e218daf7ab46..421fdde17f30f22d564c54c706befe48e4b64910 100644 (file)
@@ -101,13 +101,13 @@ handle_call({send, Data}, _From, #state{ws_pid = WsPid} = State) ->
     WsPid ! {data, Data},
     {reply, ok, State};
 handle_call(Request, From, State) ->
-    ?WARNING_MSG("Got unexpected call from ~p: ~p", [From, Request]),
+    ?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]),
     {noreply, State}.
 
 handle_cast(close, State) ->
     {stop, normal, State#state{mqtt_session = undefined}};
 handle_cast(Request, State) ->
-    ?WARNING_MSG("Got unexpected cast: ~p", [Request]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Request]),
     {noreply, State}.
 
 handle_info(closed, State) ->
@@ -119,7 +119,7 @@ handle_info({'DOWN', _, process, Pid, _}, State)
   when Pid == State#state.mqtt_session orelse Pid == State#state.ws_pid ->
     {stop, normal, State};
 handle_info(Info, State) ->
-    ?WARNING_MSG("Got unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, State) ->
index 3823489167b45e8cf594d8530b62d5a94701054c..ef9a904b83d7fff040819560b4cfce92777f372b 100644 (file)
@@ -310,7 +310,7 @@ handle_cast({reload, ServerHost, NewOpts, OldOpts}, #state{hosts = OldHosts}) ->
       end, misc:intersection(NewHosts, OldHosts)),
     {noreply, NewState};
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 handle_info({route, Packet},
@@ -337,7 +337,7 @@ handle_info({room_destroyed, {Room, Host}, Pid}, State) ->
     RMod:unregister_online_room(ServerHost, Room, Host, Pid),
     {noreply, State};
 handle_info(Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, #state{hosts = MyHosts}) ->
index 4b9a6154d87fbd67e7d2fb8d32870246cd488676..2ad8475fc99eae8944e7754055ce3dfea481737b 100644 (file)
@@ -115,7 +115,7 @@ handle_cast({add_to_log, Type, Data, Room, Opts}, State) ->
     end,
     {noreply, State};
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 handle_info(_Info, State) -> {noreply, State}.
index 1bc81e97d33aaacbed4e7f8b9fecd5b8e37babb5..0b1321f62011322771c1bf53f6eca04b7722e04b 100644 (file)
@@ -342,7 +342,7 @@ handle_info({mnesia_system_event, {mnesia_down, Node}}, State) ->
 handle_info({mnesia_system_event, {mnesia_up, _Node}}, State) ->
     {noreply, State};
 handle_info(Info, State) ->
-    ?ERROR_MSG("unexpected info: ~p", [Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
index 27d9ef2d67a7b839d37fb706851af66ce3f3f5a0..9332b698c368cea33f266a94131e36d60bcefb4b 100644 (file)
@@ -2783,7 +2783,7 @@ process_item_change(Item, SD, UJID) ->
                        undefined ->
                                <<"">>
                end,
-               ?ERROR_MSG("failed to set item ~p~s: ~p",
+               ?ERROR_MSG("Failed to set item ~p~s: ~p",
                       [Item, FromSuffix, {E, {R, ?EX_STACK(St)}}]),
            {error, xmpp:err_internal_server_error()}
     end.
index 54e0315dfa0bac937e5ebab525637b436a2db117..256c25e297ca1d90f7eb732ce30fc286f19bdca3 100644 (file)
@@ -431,7 +431,7 @@ clean_tables(ServerHost) ->
        {updated, _} ->
            ok;
        Err1 ->
-           ?ERROR_MSG("failed to clean 'muc_online_room' table: ~p", [Err1]),
+           ?ERROR_MSG("Failed to clean 'muc_online_room' table: ~p", [Err1]),
            Err1
     end,
     ?DEBUG("Cleaning SQL muc_online_users table...", []),
@@ -441,6 +441,6 @@ clean_tables(ServerHost) ->
        {updated, _} ->
            ok;
        Err2 ->
-           ?ERROR_MSG("failed to clean 'muc_online_users' table: ~p", [Err2]),
+           ?ERROR_MSG("Failed to clean 'muc_online_users' table: ~p", [Err2]),
            Err2
     end.
index 70d1e20734ad0b56163ac05f486f0f4b5884dc6d..ad2256af0b877893ab2721cac1d4fe98fe440132 100644 (file)
@@ -183,7 +183,7 @@ handle_cast({reload, NewOpts, NewOpts},
     {noreply, State#state{lservice = NewLServiceS,
                          access = Access, service_limits = SLimits}};
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 %%--------------------------------------------------------------------
index 8ec3183c8ddb6b0307835be4a75a588d924aea09..01c4e04bcf6724c3a0981d6a42c172904c264bd5 100644 (file)
@@ -698,7 +698,7 @@ offline_msg_to_route(LServer, #offline_msg{from = From, to = To} = R) ->
            Pkt2 = add_delay_info(Pkt1, LServer, R#offline_msg.timestamp),
            {route, Pkt2}
     catch _:{xmpp_codec, Why} ->
-           ?ERROR_MSG("failed to decode packet ~p of user ~s: ~s",
+           ?ERROR_MSG("Failed to decode packet ~p of user ~s: ~s",
                       [R#offline_msg.packet, jid:encode(To),
                        xmpp:format_error(Why)]),
            error
@@ -728,7 +728,7 @@ read_db_messages(LUser, LServer) ->
                    Pkt2 = xmpp:set_from_to(Pkt1, From, To),
                    [{Node, Pkt2}]
            catch _:{xmpp_codec, Why} ->
-               ?ERROR_MSG("failed to decode packet ~p "
+               ?ERROR_MSG("Failed to decode packet ~p "
                           "of user ~s: ~s",
                           [El, jid:encode(To),
                            xmpp:format_error(Why)]),
index fe2ae42a4649f70c3ec13db186cc79b5d785a69a..822ca7f434011255f560dc03b411ea2cf8c88c17 100644 (file)
@@ -216,7 +216,7 @@ export(_Server) ->
                            "server_host=%(LServer)s",
                            "xml=%(XML)s"])]
              catch _:{xmpp_codec, Why} ->
-                     ?ERROR_MSG("failed to decode packet ~p of user ~s@~s: ~s",
+                     ?ERROR_MSG("Failed to decode packet ~p of user ~s@~s: ~s",
                                 [El, LUser, LServer, xmpp:format_error(Why)]),
                      []
              end;
@@ -235,7 +235,7 @@ xml_to_offline_msg(XML) ->
        #xmlel{} = El ->
            el_to_offline_msg(El);
        Err ->
-           ?ERROR_MSG("got ~p when parsing XML packet ~s",
+           ?ERROR_MSG("Got ~p when parsing XML packet ~s",
                       [Err, XML]),
            Err
     end.
@@ -251,10 +251,10 @@ el_to_offline_msg(El) ->
                          to = To,
                          packet = El}}
     catch _:{bad_jid, To_s} ->
-           ?ERROR_MSG("failed to get 'to' JID from offline XML ~p", [El]),
+           ?ERROR_MSG("Failed to get 'to' JID from offline XML ~p", [El]),
            {error, bad_jid_to};
          _:{bad_jid, From_s} ->
-           ?ERROR_MSG("failed to get 'from' JID from offline XML ~p", [El]),
+           ?ERROR_MSG("Failed to get 'from' JID from offline XML ~p", [El]),
            {error, bad_jid_from}
     end.
 
index a41bd8d1ef0da06ed53b7c60b73097fc6da3a859..9c4940c6edc1e8a6dcc93e461f4fbd21aee582e5 100644 (file)
@@ -125,7 +125,7 @@ handle_cast({stop_ping, JID}, State) ->
     Timers = del_timer(JID, State#state.timers),
     {noreply, State#state{timers = Timers}};
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 handle_info({iq_reply, #iq{type = error}, JID}, State) ->
index ea3a86919af274a4164b385d6ce47cb86be2d330..6737873281abd36ff628bda63fda48595a6cf2ec 100644 (file)
@@ -286,7 +286,7 @@ raw_to_item({SType, SValue, SAction, Order, MatchAll,
                    match_presence_in = MatchPresenceIn,
                    match_presence_out = MatchPresenceOut}]
     catch _:_ ->
-            ?WARNING_MSG("failed to parse row: ~p", [Row]),
+            ?WARNING_MSG("Failed to parse row: ~p", [Row]),
             []
     end.
 
index e92c3e6ca0f2315752e2f735f7b90883d0bfca20..5752e321fc860d5b36bffe403cdd2fe9e9bc6eb4 100644 (file)
@@ -133,7 +133,7 @@ parse_element(LUser, LServer, XML) ->
        El when is_record(El, xmlel) ->
            {ok, El};
        _ ->
-           ?ERROR_MSG("malformed XML element in SQL table "
+           ?ERROR_MSG("Malformed XML element in SQL table "
                       "'private_storage' for user ~s@~s: ~s",
                       [LUser, LServer, XML]),
            error
index a3f7bb5a7915aafd3a88430c4d75402e9212625f..4395d90693f4a33a2c11a800460cd92f4a6ae75d 100644 (file)
@@ -95,7 +95,7 @@ register_stream(SID, Pid) ->
                            end),
                ok;
              _:badarg ->
-               ?ERROR_MSG("malformed data in redis (key = '~s'): ~p",
+               ?ERROR_MSG("Malformed data in redis (key = '~s'): ~p",
                           [SIDKey, Val]),
                {error, db_failure}
        end
@@ -128,7 +128,7 @@ unregister_stream(SID) ->
        catch _:badarg when Val == undefined ->
                ok;
              _:badarg ->
-               ?ERROR_MSG("malformed data in redis (key = '~s'): ~p",
+               ?ERROR_MSG("Malformed data in redis (key = '~s'): ~p",
                           [SIDKey, Val]),
                {error, db_failure}
        end
@@ -163,7 +163,7 @@ activate_stream(SID, IJID, MaxConnections, _Node) ->
        catch _:badarg when Val == undefined ->
                {error, notfound};
              _:badarg ->
-               ?ERROR_MSG("malformed data in redis (key = '~s'): ~p",
+               ?ERROR_MSG("Malformed data in redis (key = '~s'): ~p",
                           [SIDKey, Val]),
                {error, db_failure}
        end
index 7274bbdf9a80ea8e5da61f849752ada0d34c8fb5..a27dcc11cf5bc4ec446bdfba108be3b689d340d2 100644 (file)
@@ -105,7 +105,7 @@ handle_cast({reload, ServerHost, NewOpts, OldOpts}, State) ->
       end, OldHosts -- NewHosts),
     {noreply, State#state{myhosts = NewHosts}};
 handle_cast(Msg, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Msg]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
     {noreply, State}.
 
 code_change(_OldVsn, State, _Extra) -> {ok, State}.
@@ -213,7 +213,7 @@ process_bytestreams(#iq{type = set, lang = Lang, from = InitiatorJID, to = To,
                    Txt = ?T("Bytestream already activated"),
                    xmpp:make_error(IQ, xmpp:err_conflict(Txt, Lang));
                {error, Err} ->
-                   ?ERROR_MSG("failed to activate bytestream from ~s to ~s: ~p",
+                   ?ERROR_MSG("Failed to activate bytestream from ~s to ~s: ~p",
                               [Initiator, Target, Err]),
                    Txt = ?T("Database failure"),
                    xmpp:make_error(IQ, xmpp:err_internal_server_error(Txt, Lang))
index d655e274128da59634210d1d171dda5a2aa954c0..31c2dcc3690469e533967fc2a081bdebe8421d3c 100644 (file)
@@ -43,7 +43,7 @@ init() ->
        {updated, _} ->
            ok;
        Err ->
-           ?ERROR_MSG("failed to clean 'proxy65' table: ~p", [Err]),
+           ?ERROR_MSG("Failed to clean 'proxy65' table: ~p", [Err]),
            Err
     end.
 
index d45f5961f9b082cae24665163d460433f2f146cc..87b5a10a4b7a26fa343f7bc149c8887ee2c8861e 100644 (file)
@@ -239,7 +239,7 @@ stop(Host) ->
 
 init([ServerHost, Opts]) ->
     process_flag(trap_exit, true),
-    ?DEBUG("pubsub init ~p ~p", [ServerHost, Opts]),
+    ?DEBUG("Pubsub init ~p ~p", [ServerHost, Opts]),
     Hosts = gen_mod:get_opt_hosts(Opts),
     Access = mod_pubsub_opt:access_createnode(Opts),
     PepOffline = mod_pubsub_opt:ignore_pep_from_offline(Opts),
@@ -3559,11 +3559,11 @@ tree_call({_User, Server, _Resource}, Function, Args) ->
     tree_call(Server, Function, Args);
 tree_call(Host, Function, Args) ->
     Tree = tree(Host),
-    ?DEBUG("tree_call apply(~s, ~s, ~p) @ ~s", [Tree, Function, Args, Host]),
+    ?DEBUG("Tree_call apply(~s, ~s, ~p) @ ~s", [Tree, Function, Args, Host]),
     apply(Tree, Function, Args).
 
 tree_action(Host, Function, Args) ->
-    ?DEBUG("tree_action ~p ~p ~p", [Host, Function, Args]),
+    ?DEBUG("Tree_action ~p ~p ~p", [Host, Function, Args]),
     ServerHost = serverhost(Host),
     Fun = fun () -> tree_call(Host, Function, Args) end,
     case mod_pubsub_opt:db_type(ServerHost) of
@@ -3574,7 +3574,7 @@ tree_action(Host, Function, Args) ->
                {atomic, Result} ->
                    Result;
                {aborted, Reason} ->
-                   ?ERROR_MSG("transaction return internal error: ~p~n", [{aborted, Reason}]),
+                   ?ERROR_MSG("Transaction return internal error: ~p~n", [{aborted, Reason}]),
                    ErrTxt = ?T("Database failure"),
                    {error, xmpp:err_internal_server_error(ErrTxt, ejabberd_option:language())}
            end;
@@ -3584,7 +3584,7 @@ tree_action(Host, Function, Args) ->
 
 %% @doc <p>node plugin call.</p>
 node_call(Host, Type, Function, Args) ->
-    ?DEBUG("node_call ~p ~p ~p", [Type, Function, Args]),
+    ?DEBUG("Node_call ~p ~p ~p", [Type, Function, Args]),
     Module = plugin(Host, Type),
     case apply(Module, Function, Args) of
        {result, Result} ->
@@ -3603,7 +3603,7 @@ node_call(Host, Type, Function, Args) ->
     end.
 
 node_action(Host, Type, Function, Args) ->
-    ?DEBUG("node_action ~p ~p ~p ~p", [Host, Type, Function, Args]),
+    ?DEBUG("Node_action ~p ~p ~p ~p", [Host, Type, Function, Args]),
     transaction(Host, fun () ->
                node_call(Host, Type, Function, Args)
        end,
@@ -3653,10 +3653,10 @@ do_transaction(ServerHost, Fun, Trans, DBType) ->
        {atomic, {error, Error}} ->
            {error, Error};
        {aborted, Reason} ->
-           ?ERROR_MSG("transaction return internal error: ~p~n", [{aborted, Reason}]),
+           ?ERROR_MSG("Transaction return internal error: ~p~n", [{aborted, Reason}]),
            {error, xmpp:err_internal_server_error(?T("Database failure"), ejabberd_option:language())};
        Other ->
-           ?ERROR_MSG("transaction return internal error: ~p~n", [Other]),
+           ?ERROR_MSG("Transaction return internal error: ~p~n", [Other]),
            {error, xmpp:err_internal_server_error(?T("Database failure"), ejabberd_option:language())}
     end.
 
@@ -3833,7 +3833,7 @@ purge_offline(LJID) ->
                            end
                    end, lists:usort(lists:flatten(Affs)));
        {Error, _} ->
-           ?ERROR_MSG("can not purge offline: ~p", [Error])
+           ?ERROR_MSG("Can not purge offline: ~p", [Error])
     end.
 
 -spec purge_offline(host(), ljid(), #pubsub_node{}) -> ok | {error, stanza_error()}.
index d5d8d35cb7d7534ba6b600f44ae3741fbd062050..ee5b76db325b412365df52f67a1f8137e29abaee 100644 (file)
@@ -464,8 +464,7 @@ check_timeout(Source) ->
           case mnesia:transaction(F) of
             {atomic, Res} -> Res;
             {aborted, Reason} ->
-                ?ERROR_MSG("mod_register: timeout check error: ~p~n",
-                           [Reason]),
+                ?ERROR_MSG("timeout check error: ~p~n", [Reason]),
                 true
           end;
        true -> true
@@ -499,7 +498,7 @@ remove_timeout(Source) ->
           case mnesia:transaction(F) of
             {atomic, ok} -> ok;
             {aborted, Reason} ->
-                ?ERROR_MSG("mod_register: timeout remove error: "
+                ?ERROR_MSG("Mod_register: timeout remove error: "
                            "~p~n",
                            [Reason]),
                 ok
index 88132ee9c1598e511b1cef59b1cb39972aa7cc1d..3a08e1cb811eca31e22606da504680430c2836c0 100644 (file)
@@ -178,7 +178,7 @@ css() ->
        {ok, Data} ->
            {ok, Data};
        {error, Why} ->
-           ?ERROR_MSG("failed to read ~s: ~s", [File, file:format_error(Why)]),
+           ?ERROR_MSG("Failed to read ~s: ~s", [File, file:format_error(Why)]),
            error
     end.
 
index dd721db6ceffb90705c002a6d292d0604e20def8..ea56aeede038eb8fe6221343e808409c3f0b8802 100644 (file)
@@ -321,7 +321,7 @@ process_iq_get(#iq{to = To, lang = Lang,
                                 ver = Version}
           end)
     catch ?EX_RULE(E, R, St) ->
-           ?ERROR_MSG("failed to process roster get for ~s: ~p",
+           ?ERROR_MSG("Failed to process roster get for ~s: ~p",
                       [jid:encode(To), {E, {R, ?EX_STACK(St)}}]),
            Txt = ?T("Roster module has failed"),
            xmpp:make_error(IQ, xmpp:err_internal_server_error(Txt, Lang))
@@ -446,7 +446,7 @@ process_iq_set(#iq{from = _From, to = To,
        ok ->
            xmpp:make_iq_result(IQ);
        E ->
-           ?ERROR_MSG("roster set failed:~nIQ = ~s~nError = ~p",
+           ?ERROR_MSG("Roster set failed:~nIQ = ~s~nError = ~p",
                       [xmpp:pp(IQ), E]),
            xmpp:make_error(IQ, xmpp:err_internal_server_error())
     end.
index 58d4eedc1dbba45c910864656e4c7f4ca96dae3f..47dffca8056918247e6aeebd27c95179ad5922f3 100644 (file)
@@ -708,7 +708,7 @@ c2s_self_presence(Acc) ->
 unset_presence(LUser, LServer, Resource, Status) ->
     Resources = ejabberd_sm:get_user_resources(LUser,
                                               LServer),
-    ?DEBUG("unset_presence for ~p @ ~p / ~p -> ~p "
+    ?DEBUG("Unset_presence for ~p @ ~p / ~p -> ~p "
           "(~p resources)",
           [LUser, LServer, Resource, Status, length(Resources)]),
     case length(Resources) of
index 9dc4686a96b3b90257124631542766d5e8ffe135..54d8ac2519af5d06c42eb95ea1709f1b70cc55e2 100644 (file)
@@ -286,7 +286,7 @@ check_auth(#sip{method = Method, hdrs = Hdrs, body = Body}, AuthHdr, _SIPSock) -
                Password when is_binary(Password) ->
                    esip:check_auth(Auth, Method, Body, Password);
                _ScramedPassword ->
-                   ?ERROR_MSG("unable to authenticate ~s@~s against SCRAM'ed "
+                   ?ERROR_MSG("Unable to authenticate ~s@~s against SCRAM'ed "
                               "password", [LUser, LServer]),
                    false
            end;
index dc004a93c663fdce28a37e124c19771b599d50df..26a4398ea974d5b653476c1e2fea1babb3845149 100644 (file)
@@ -80,7 +80,7 @@ request(#sip{hdrs = Hdrs} = Req, SIPSock) ->
         [<<"*">>] when Expires == 0 ->
             case unregister_session(US, CallID, CSeq) of
                {ok, ContactsWithExpires} ->
-                   ?INFO_MSG("unregister SIP session for user ~s@~s from ~s",
+                   ?INFO_MSG("Unregister SIP session for user ~s@~s from ~s",
                              [LUser, LServer, inet_parse:ntoa(PeerIP)]),
                    Cs = prepare_contacts_to_send(ContactsWithExpires),
                    mod_sip:make_response(
@@ -223,7 +223,7 @@ handle_info({'DOWN', MRef, process, _Pid, _Reason}, State) ->
     end,
     {noreply, State};
 handle_info(_Info, State) ->
-    ?ERROR_MSG("got unexpected info: ~p", [_Info]),
+    ?ERROR_MSG("Unexpected info: ~p", [_Info]),
     {noreply, State}.
 
 terminate(_Reason, _State) ->
index fd18b9fa04106adc4c509186ef7bc4d1ae99f8b3..b669bd8d91b62829a64a7b67136d3ab0f7a38d28 100644 (file)
@@ -93,7 +93,7 @@ stop(Host) ->
 
 reload(_Host, NewOpts, _OldOpts) ->
     init_cache(NewOpts),
-    ?WARNING_MSG("module ~s is reloaded, but new configuration will take "
+    ?WARNING_MSG("Module ~s is reloaded, but new configuration will take "
                 "effect for newly created client connections only", [?MODULE]).
 
 depends(_Host, _Opts) ->
index 8c337528faf2512382e7bb58eb625f67ecfb48fc..0474f644c0b44e370be6aa5cd8e62fcc9e7bde48 100644 (file)
@@ -117,7 +117,7 @@ init([Host, Opts]) ->
                        process_local_iq_info),
                      case Mod:is_search_supported(Host) of
                          false ->
-                             ?WARNING_MSG("vcard search functionality is "
+                             ?WARNING_MSG("vCard search functionality is "
                                           "not implemented for ~s backend",
                                           [mod_vcard_opt:db_type(Opts)]);
                          true ->
@@ -133,7 +133,7 @@ handle_call(_Call, _From, State) ->
     {noreply, State}.
 
 handle_cast(Cast, State) ->
-    ?WARNING_MSG("unexpected cast: ~p", [Cast]),
+    ?WARNING_MSG("Unexpected cast: ~p", [Cast]),
     {noreply, State}.
 
 handle_info({route, Packet}, State) ->
@@ -143,7 +143,7 @@ handle_info({route, Packet}, State) ->
     end,
     {noreply, State};
 handle_info(Info, State) ->
-    ?WARNING_MSG("unexpected info: ~p", [Info]),
+    ?WARNING_MSG("Unexpected info: ~p", [Info]),
     {noreply, State}.
 
 terminate(_Reason, #state{hosts = MyHosts, server_host = Host}) ->
index 472f38b67b196257a915d5640fe0cbd3c3ef0964..d38d03d82c4e83315304ba974f75f653eca83163 100644 (file)
@@ -55,7 +55,7 @@ from_dir(ProsodyDir) ->
                                      "privacy", "pep", "pubsub"])
                      end, HostDirs);
                {error, Why} = Err ->
-                   ?ERROR_MSG("failed to list ~s: ~s",
+                   ?ERROR_MSG("Failed to list ~s: ~s",
                               [ProsodyDir, file:format_error(Why)]),
                    Err
            end;
@@ -97,7 +97,7 @@ convert_dir(Path, Host, Type) ->
        {error, enoent} ->
            ok;
        {error, Why} = Err ->
-           ?ERROR_MSG("failed to list ~s: ~s",
+           ?ERROR_MSG("Failed to list ~s: ~s",
                       [Path, file:format_error(Why)]),
            Err
     end.
@@ -119,11 +119,11 @@ eval_file(Path) ->
                {ok, _} = Res ->
                    Res;
                {error, Why} = Err ->
-                   ?ERROR_MSG("failed to eval ~s: ~p", [Path, Why]),
+                   ?ERROR_MSG("Failed to eval ~s: ~p", [Path, Why]),
                    Err
            end;
        {error, Why} = Err ->
-           ?ERROR_MSG("failed to read file ~s: ~s",
+           ?ERROR_MSG("Failed to read file ~s: ~s",
                       [Path, file:format_error(Why)]),
            Err
     end.
@@ -151,7 +151,7 @@ convert_data(Host, "accounts", User, [Data]) ->
        ok ->
            ok;
        Err ->
-           ?ERROR_MSG("failed to register user ~s@~s: ~p",
+           ?ERROR_MSG("Failed to register user ~s@~s: ~p",
                       [User, Host, Err]),
            Err
     end;
@@ -272,12 +272,12 @@ convert_data(HostStr, "pubsub", Node, [Data]) ->
                            Error
                    end;
                Error ->
-                   ?ERROR_MSG("failed to import pubsub node ~s on ~p:~n~p",
+                   ?ERROR_MSG("Failed to import pubsub node ~s on ~p:~n~p",
                               [Node, Host, NodeData]),
                    Error
            end;
        Error ->
-           ?ERROR_MSG("failed to import pubsub node: ~p", [Error]),
+           ?ERROR_MSG("Failed to import pubsub node: ~p", [Error]),
            Error
     end;
 convert_data(_Host, _Type, _User, _Data) ->