You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2021/09/07 20:05:26 UTC
[couchdb] branch main updated: Set structured logger to info level
for exunit tests
This is an automated email from the ASF dual-hosted git repository.
jaydoane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new be326c6 Set structured logger to info level for exunit tests
be326c6 is described below
commit be326c63faa679b7c69b3b5cf9d48c41aa66130d
Author: Jay Doane <ja...@apache.org>
AuthorDate: Fri Sep 3 16:58:17 2021 -0700
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)
---
src/chttpd/test/exunit/test_helper.exs | 4 ++++
src/couch/test/exunit/test_helper.exs | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/src/chttpd/test/exunit/test_helper.exs b/src/chttpd/test/exunit/test_helper.exs
index 3140500..d3392d6 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 3140500..d3392d6 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()