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/03 23:58:32 UTC

[couchdb] branch suppress-exunit-debug-logging created (now 17a6a0a)

This is an automated email from the ASF dual-hosted git repository.

jaydoane pushed a change to branch suppress-exunit-debug-logging
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 17a6a0a  Set structured logger to info level for exunit tests

This branch includes the following new commits:

     new 17a6a0a  Set structured logger to info level for exunit tests

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[couchdb] 01/01: Set structured logger to info level for exunit tests

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jaydoane pushed a commit to branch suppress-exunit-debug-logging
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 17a6a0a2f8f94ed496518b5adfe248469e940b6a
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 | 2 ++
 src/couch/test/exunit/test_helper.exs  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/chttpd/test/exunit/test_helper.exs b/src/chttpd/test/exunit/test_helper.exs
index 3140500..c7085f2 100644
--- a/src/chttpd/test/exunit/test_helper.exs
+++ b/src/chttpd/test/exunit/test_helper.exs
@@ -1,2 +1,4 @@
 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..c7085f2 100644
--- a/src/couch/test/exunit/test_helper.exs
+++ b/src/couch/test/exunit/test_helper.exs
@@ -1,2 +1,4 @@
 ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter])
+Kernel.function_exported?(:logger, :set_primary_config, 2) and
+  :logger.set_primary_config(:level, :info)
 ExUnit.start()