diff options
author | Jay Doane <jaydoane@apache.org> | 2021-09-03 16:58:17 -0700 |
---|---|---|
committer | Jay Doane <jay.s.doane@gmail.com> | 2021-09-07 13:04:26 -0700 |
commit | be326c63faa679b7c69b3b5cf9d48c41aa66130d (patch) | |
tree | 29c6a16e599c607fa622fe13d6bdaa40ddd13953 | |
parent | bd3ebbf899ce76c45da3850a4d6c0d70f105b805 (diff) | |
download | couchdb-be326c63faa679b7c69b3b5cf9d48c41aa66130d.tar.gz |
Set structured logger to info level for exunit tests
Suppress excessive debug logging of the form:
mix test --cover --trace src/chttpd/test/exunit/pagination_test.exs:232
* test Legacy API (10 docs) : _all_docs/queries
12:40:01.895 [debug] [user: "adm", what: :login_attempt]
12:40:01.906 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.925 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.934 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.944 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.952 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.960 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.968 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.977 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.985 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:01.995 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:02.004 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:02.013 [debug] [username: 'adm', what: :successful_cookie_auth]
12:40:02.019 [debug] [username: 'adm', what: :successful_cookie_auth]
* test Legacy API (10 docs) : _all_docs/queries (152.2ms)
-rw-r--r-- | src/chttpd/test/exunit/test_helper.exs | 4 | ||||
-rw-r--r-- | src/couch/test/exunit/test_helper.exs | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/chttpd/test/exunit/test_helper.exs b/src/chttpd/test/exunit/test_helper.exs index 314050085..d3392d6cc 100644 --- a/src/chttpd/test/exunit/test_helper.exs +++ b/src/chttpd/test/exunit/test_helper.exs @@ -1,2 +1,6 @@ ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter]) + +Kernel.function_exported?(:logger, :set_primary_config, 2) and + :logger.set_primary_config(:level, :info) + ExUnit.start() diff --git a/src/couch/test/exunit/test_helper.exs b/src/couch/test/exunit/test_helper.exs index 314050085..d3392d6cc 100644 --- a/src/couch/test/exunit/test_helper.exs +++ b/src/couch/test/exunit/test_helper.exs @@ -1,2 +1,6 @@ ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter]) + +Kernel.function_exported?(:logger, :set_primary_config, 2) and + :logger.set_primary_config(:level, :info) + ExUnit.start() |