rewrite from lager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 line
695 B

4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
  1. -module(lager_metadata_whitelist_test).
  2. -ifdef(TEST).
  3. -include_lib("eunit/include/eunit.hrl").
  4. setup() ->
  5. ok = error_logger:tty(false),
  6. ok = rumUtil:safe_application_load(lager),
  7. ok = application:set_env(lager, handlers, [{lager_common_test_backend, info}]),
  8. ok = application:set_env(lager, error_logger_redirect, false),
  9. ok = application:unset_env(lager, traces),
  10. ok = eRum:start(),
  11. ok = timer:sleep(250),
  12. ok.
  13. cleanup(_) ->
  14. ok = application:unset_env(lager, metadata_whitelist),
  15. catch ets:delete(lager_config), %% kill the ets config table with fire
  16. ok = application:stop(lager),
  17. ok = application:stop(goldrush),
  18. ok = error_logger:tty(true).
  19. -endif.