rewrite from lager
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
691 B

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, errLoggerRedirect, 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.