mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 01:39:35 +02:00
Add logger macro to help troubleshooting Elixir tests
This commit is contained in:
parent
97d345d287
commit
a8f92ae767
2 changed files with 40 additions and 0 deletions
|
@ -34,3 +34,10 @@
|
|||
|
||||
-define(CRITICAL_MSG(Format, Args),
|
||||
lager:critical(Format, Args)).
|
||||
|
||||
%% Use only when trying to troubleshoot test problem with ExUnit
|
||||
-define(EXUNIT_LOG(Format, Args),
|
||||
case lists:keyfind(logger, 1, application:loaded_applications()) of
|
||||
false -> ok;
|
||||
_ -> 'Elixir.Logger':bare_log(error, io_lib:format(Format, Args), [?MODULE])
|
||||
end).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue