]> granicus.if.org Git - ejabberd/commitdiff
Don't log warning when an option is consulted for uknown vhost
authorEvgeny Khramtsov <ekhramtsov@process-one.net>
Wed, 25 Sep 2019 10:58:05 +0000 (13:58 +0300)
committerEvgeny Khramtsov <ekhramtsov@process-one.net>
Wed, 25 Sep 2019 10:58:05 +0000 (13:58 +0300)
Such warnings may be unappropriate in some situation, e.g.
when a virtual host is disabled in runtime but some packets
for this host are still in transit.

Fixes #3037

src/ejabberd_config.erl

index c1d23530afeea40f9262ecb5d4ed44a1debbf67f..9d0290f415cf10596b7d502efaa07a2222b63e3d 100644 (file)
@@ -158,10 +158,10 @@ get_option({O, Host} = Opt) ->
     catch ?EX_RULE(error, badarg, St) when Host /= global ->
            StackTrace = ?EX_STACK(St),
            Val = get_option({O, global}),
-           ?WARNING_MSG("Option '~ts' is not defined for virtual host '~ts'. "
-                        "This is a bug, please report it with the following "
-                        "stacktrace included:~n** ~ts",
-                        [O, Host, misc:format_exception(2, error, badarg, StackTrace)]),
+           ?DEBUG("Option '~ts' is not defined for virtual host '~ts'. "
+                  "This is a bug, please report it with the following "
+                  "stacktrace included:~n** ~ts",
+                  [O, Host, misc:format_exception(2, error, badarg, StackTrace)]),
            Val
     end.