summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Doane <jaydoane@apache.org>2021-09-03 16:58:17 -0700
committerJay Doane <jay.s.doane@gmail.com>2021-09-07 13:04:26 -0700
commitbe326c63faa679b7c69b3b5cf9d48c41aa66130d (patch)
tree29c6a16e599c607fa622fe13d6bdaa40ddd13953
parentbd3ebbf899ce76c45da3850a4d6c0d70f105b805 (diff)
downloadcouchdb-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.exs4
-rw-r--r--src/couch/test/exunit/test_helper.exs4
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()