25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix log printout

Log is not only called for admin commands. It is call for all commands call.
This commit is contained in:
Mickael Remond 2016-03-29 11:21:53 +02:00
parent 54ddc990c2
commit 53d12caa56

View File

@ -28,9 +28,9 @@
%% in ejabberd_http listener %% in ejabberd_http listener
%% request_handlers: %% request_handlers:
%% "/api": mod_http_api %% "/api": mod_http_api
%% %%
%% Access rights are defined with: %% Access rights are defined with:
%% commands_admin_access: configure %% commands_admin_access: configure
%% commands: %% commands:
%% - add_commands: user %% - add_commands: user
%% %%
@ -385,7 +385,7 @@ json_response(Code, Body) when is_integer(Code) ->
log(Call, Args, {Addr, Port}) -> log(Call, Args, {Addr, Port}) ->
AddrS = jlib:ip_to_list({Addr, Port}), AddrS = jlib:ip_to_list({Addr, Port}),
?INFO_MSG("Admin call ~s ~p from ~s:~p", [Call, Args, AddrS, Port]). ?INFO_MSG("API call ~s ~p from ~s:~p", [Call, Args, AddrS, Port]).
mod_opt_type(access) -> mod_opt_type(access) ->
fun(Access) when is_atom(Access) -> Access end; fun(Access) when is_atom(Access) -> Access end;