26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Lower log level for some messages

This commit is contained in:
Evgeniy Khramtsov 2017-04-15 15:47:00 +03:00
parent 4c5f97bb9a
commit 41fe062a8d
16 changed files with 17 additions and 17 deletions

View File

@ -153,7 +153,7 @@ code_change(_OldVsn, State, _Extra) ->
%%% Internal functions %%% Internal functions
%%%=================================================================== %%%===================================================================
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Redis route entries...", []), ?DEBUG("Cleaning Redis route entries...", []),
lists:foreach( lists:foreach(
fun(#route{domain = Domain, pid = Pid}) when node(Pid) == node() -> fun(#route{domain = Domain, pid = Pid}) when node(Pid) == node() ->
unregister_route(Domain, undefined, Pid); unregister_route(Domain, undefined, Pid);

View File

@ -70,7 +70,7 @@ route_schema() ->
{record_info(fields, route), #route{}}. {record_info(fields, route), #route{}}.
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Riak 'route' table...", []), ?DEBUG("Cleaning Riak 'route' table...", []),
case ejabberd_riak:get(route, route_schema()) of case ejabberd_riak:get(route, route_schema()) of
{ok, Routes} -> {ok, Routes} ->
lists:foreach( lists:foreach(

View File

@ -39,7 +39,7 @@
%%%=================================================================== %%%===================================================================
init() -> init() ->
Node = erlang:atom_to_binary(node(), latin1), Node = erlang:atom_to_binary(node(), latin1),
?INFO_MSG("Cleaning SQL 'route' table...", []), ?DEBUG("Cleaning SQL 'route' table...", []),
case ejabberd_sql:sql_query( case ejabberd_sql:sql_query(
?MYNAME, ?SQL("delete from route where node=%(Node)s")) of ?MYNAME, ?SQL("delete from route where node=%(Node)s")) of
{updated, _} -> {updated, _} ->

View File

@ -188,7 +188,7 @@ decode_session_list(Vals) ->
[binary_to_term(Val) || {_, Val} <- Vals]. [binary_to_term(Val) || {_, Val} <- Vals].
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Redis SM table...", []), ?DEBUG("Cleaning Redis SM table...", []),
try try
lists:foreach( lists:foreach(
fun(LServer) -> fun(LServer) ->

View File

@ -63,7 +63,7 @@ session_schema() ->
clean_table() -> clean_table() ->
%% TODO: not very efficient, rewrite using map-reduce or something %% TODO: not very efficient, rewrite using map-reduce or something
?INFO_MSG("Cleaning Riak 'sm' table...", []), ?DEBUG("Cleaning Riak 'sm' table...", []),
lists:foreach( lists:foreach(
fun(#session{sid = {_, Pid} = SID}) when node(Pid) == node() -> fun(#session{sid = {_, Pid} = SID}) when node(Pid) == node() ->
ejabberd_riak:delete(session, SID); ejabberd_riak:delete(session, SID);

View File

@ -47,7 +47,7 @@
-spec init() -> ok | {error, any()}. -spec init() -> ok | {error, any()}.
init() -> init() ->
Node = erlang:atom_to_binary(node(), latin1), Node = erlang:atom_to_binary(node(), latin1),
?INFO_MSG("Cleaning SQL SM table...", []), ?DEBUG("Cleaning SQL SM table...", []),
lists:foldl( lists:foldl(
fun(Host, ok) -> fun(Host, ok) ->
case ejabberd_sql:sql_query( case ejabberd_sql:sql_query(

View File

@ -115,7 +115,7 @@ code_change(_OldVsn, State, _Extra) ->
%%% Internal functions %%% Internal functions
%%%=================================================================== %%%===================================================================
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Redis BOSH sessions...", []), ?DEBUG("Cleaning Redis BOSH sessions...", []),
case ejabberd_redis:hgetall(?BOSH_KEY) of case ejabberd_redis:hgetall(?BOSH_KEY) of
{ok, Vals} -> {ok, Vals} ->
ejabberd_redis:multi( ejabberd_redis:multi(

View File

@ -56,7 +56,7 @@ bosh_schema() ->
{record_info(fields, bosh), #bosh{}}. {record_info(fields, bosh), #bosh{}}.
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Riak 'bosh' table...", []), ?DEBUG("Cleaning Riak 'bosh' table...", []),
case ejabberd_riak:get(bosh, bosh_schema()) of case ejabberd_riak:get(bosh, bosh_schema()) of
{ok, Rs} -> {ok, Rs} ->
lists:foreach( lists:foreach(

View File

@ -23,7 +23,7 @@
%%%=================================================================== %%%===================================================================
init() -> init() ->
Node = erlang:atom_to_binary(node(), latin1), Node = erlang:atom_to_binary(node(), latin1),
?INFO_MSG("Cleaning SQL 'bosh' table...", []), ?DEBUG("Cleaning SQL 'bosh' table...", []),
case ejabberd_sql:sql_query( case ejabberd_sql:sql_query(
?MYNAME, ?SQL("delete from bosh where node=%(Node)s")) of ?MYNAME, ?SQL("delete from bosh where node=%(Node)s")) of
{updated, _} -> {updated, _} ->

View File

@ -150,7 +150,7 @@ code_change(_OldVsn, State, _Extra) ->
%%% Internal functions %%% Internal functions
%%%=================================================================== %%%===================================================================
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Redis 'carboncopy' table...", []), ?DEBUG("Cleaning Redis 'carboncopy' table...", []),
NodeKey = node_key(), NodeKey = node_key(),
case ejabberd_redis:smembers(NodeKey) of case ejabberd_redis:smembers(NodeKey) of
{ok, JIDs} -> {ok, JIDs} ->

View File

@ -66,7 +66,7 @@ carboncopy_schema() ->
{record_info(fields, carboncopy), #carboncopy{}}. {record_info(fields, carboncopy), #carboncopy{}}.
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Riak 'carboncopy' table...", []), ?DEBUG("Cleaning Riak 'carboncopy' table...", []),
case ejabberd_riak:get(carboncopy, carboncopy_schema()) of case ejabberd_riak:get(carboncopy, carboncopy_schema()) of
{ok, Rs} -> {ok, Rs} ->
lists:foreach( lists:foreach(

View File

@ -82,7 +82,7 @@ list(LUser, LServer) ->
%%%=================================================================== %%%===================================================================
clean_table(LServer) -> clean_table(LServer) ->
NodeS = erlang:atom_to_binary(node(), latin1), NodeS = erlang:atom_to_binary(node(), latin1),
?INFO_MSG("Cleaning SQL 'carboncopy' table...", []), ?DEBUG("Cleaning SQL 'carboncopy' table...", []),
case ejabberd_sql:sql_query( case ejabberd_sql:sql_query(
LServer, LServer,
?SQL("delete from carboncopy where node=%(NodeS)s")) of ?SQL("delete from carboncopy where node=%(NodeS)s")) of

View File

@ -330,7 +330,7 @@ import(_, _, _) ->
%%%=================================================================== %%%===================================================================
clean_tables(ServerHost) -> clean_tables(ServerHost) ->
NodeS = erlang:atom_to_binary(node(), latin1), NodeS = erlang:atom_to_binary(node(), latin1),
?INFO_MSG("Cleaning SQL muc_online_room table...", []), ?DEBUG("Cleaning SQL muc_online_room table...", []),
case ejabberd_sql:sql_query( case ejabberd_sql:sql_query(
ServerHost, ServerHost,
?SQL("delete from muc_online_room where node=%(NodeS)s")) of ?SQL("delete from muc_online_room where node=%(NodeS)s")) of
@ -340,7 +340,7 @@ clean_tables(ServerHost) ->
?ERROR_MSG("failed to clean 'muc_online_room' table: ~p", [Err1]), ?ERROR_MSG("failed to clean 'muc_online_room' table: ~p", [Err1]),
Err1 Err1
end, end,
?INFO_MSG("Cleaning SQL muc_online_users table...", []), ?DEBUG("Cleaning SQL muc_online_users table...", []),
case ejabberd_sql:sql_query( case ejabberd_sql:sql_query(
ServerHost, ServerHost,
?SQL("delete from muc_online_users where node=%(NodeS)s")) of ?SQL("delete from muc_online_users where node=%(NodeS)s")) of

View File

@ -37,7 +37,7 @@
%%% API %%% API
%%%=================================================================== %%%===================================================================
init() -> init() ->
?INFO_MSG("Cleaning Redis 'proxy65' table...", []), ?DEBUG("Cleaning Redis 'proxy65' table...", []),
NodeKey = node_key(), NodeKey = node_key(),
case ejabberd_redis:smembers(NodeKey) of case ejabberd_redis:smembers(NodeKey) of
{ok, SIDs} -> {ok, SIDs} ->

View File

@ -93,7 +93,7 @@ proxy65_schema() ->
{record_info(fields, proxy65), #proxy65{}}. {record_info(fields, proxy65), #proxy65{}}.
clean_table() -> clean_table() ->
?INFO_MSG("Cleaning Riak 'proxy65' table...", []), ?DEBUG("Cleaning Riak 'proxy65' table...", []),
case ejabberd_riak:get(proxy65, proxy65_schema()) of case ejabberd_riak:get(proxy65, proxy65_schema()) of
{ok, Rs} -> {ok, Rs} ->
lists:foreach( lists:foreach(

View File

@ -37,7 +37,7 @@
%%%=================================================================== %%%===================================================================
init() -> init() ->
NodeS = erlang:atom_to_binary(node(), latin1), NodeS = erlang:atom_to_binary(node(), latin1),
?INFO_MSG("Cleaning SQL 'proxy65' table...", []), ?DEBUG("Cleaning SQL 'proxy65' table...", []),
case ejabberd_sql:sql_query( case ejabberd_sql:sql_query(
?MYNAME, ?MYNAME,
?SQL("delete from proxy65 where " ?SQL("delete from proxy65 where "