From 3f68bb65b9dcaa35550301960a4b4d67c1dbaefc Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 9 Apr 2014 23:12:53 +0200 Subject: [PATCH] mod_s2s_log: Remove ?DEBUG() calls Current ejabberd versions support two different logging frameworks that require different build options. There's currently no easy way to deal with this for external modules, so let's omit the ?DEBUG() calls for the moment. --- mod_s2s_log/src/mod_s2s_log.erl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mod_s2s_log/src/mod_s2s_log.erl b/mod_s2s_log/src/mod_s2s_log.erl index de403d2..4d821d9 100644 --- a/mod_s2s_log/src/mod_s2s_log.erl +++ b/mod_s2s_log/src/mod_s2s_log.erl @@ -50,12 +50,11 @@ -record(config, {filename=?DEFAULT_FILENAME, iodevice}). %% For now we only support one log file for all vhosts. -start(Host, Opts) -> +start(_Host, Opts) -> %% ejabberd starts modules sequentially so we assume no race %% condition is possible here case whereis(?PROCNAME) of undefined -> - ?DEBUG("Starting mod_s2s_log ~p ~p~n", [Host, Opts]), Filename = gen_mod:get_opt(filename, Opts, ?DEFAULT_FILENAME), %% TODO: Both hooks will need Host parameter for vhost support ejabberd_hooks:add(reopen_log_hook, ?MODULE, reopen_log, 55), @@ -67,7 +66,6 @@ start(Host, Opts) -> end. init(Config)-> - ?DEBUG("Starting mod_s2s_log ~p with config ~p~n", [?MODULE, Config]), {ok, IOD} = file:open(Config#config.filename, ?FILE_OPTS), loop(Config#config{iodevice=IOD}). @@ -79,7 +77,6 @@ loop(Config) -> {reopen_log} -> file:close(Config#config.iodevice), {ok, IOD} = file:open(Config#config.filename, ?FILE_OPTS), - ?INFO_MSG("Reopened s2s log file", []), loop(Config#config{iodevice = IOD}); stop -> file:close(Config#config.iodevice),