aboutsummaryrefslogtreecommitdiff
path: root/include/logger.hrl
diff options
context:
space:
mode:
Diffstat (limited to 'include/logger.hrl')
-rw-r--r--include/logger.hrl7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/logger.hrl b/include/logger.hrl
index 18dc7041c..df0776863 100644
--- a/include/logger.hrl
+++ b/include/logger.hrl
@@ -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).