qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject qpid-dispatch git commit: DISPATCH-1104: use correct log level names for qdstat GET-LOG
Date Thu, 16 Aug 2018 18:19:04 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 483b92936 -> 385bbe9eb


DISPATCH-1104: use correct log level names for qdstat GET-LOG

Convert mask bit to index for referencing name table.
Qdstat level names in tests now match what is in system log file.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/385bbe9e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/385bbe9e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/385bbe9e

Branch: refs/heads/master
Commit: 385bbe9ebe69cf567b4e88d016d5eaca38ce73d2
Parents: 483b929
Author: Chuck Rolke <crolke@redhat.com>
Authored: Thu Aug 16 14:13:56 2018 -0400
Committer: Chuck Rolke <crolke@redhat.com>
Committed: Thu Aug 16 14:13:56 2018 -0400

----------------------------------------------------------------------
 src/log.c                      | 2 +-
 tests/system_tests_qdmanage.py | 2 +-
 tests/system_tests_qdstat.py   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/385bbe9e/src/log.c
----------------------------------------------------------------------
diff --git a/src/log.c b/src/log.c
index f0acd7a..b102736 100644
--- a/src/log.c
+++ b/src/log.c
@@ -446,7 +446,7 @@ PyObject *qd_log_recent_py(long limit) {
         int i = 0;
         // NOTE: PyList_SetItem steals a reference so no leak here.
         PyList_SetItem(py_entry, i++, PyUnicode_FromString(entry->module));
-        const char* level = level_name(entry->level);
+        const char* level = level_name( level_index_for_bit(entry->level) + 2 );
         PyList_SetItem(py_entry, i++, level ? PyUnicode_FromString(level) : inc_none());
         PyList_SetItem(py_entry, i++, PyUnicode_FromString(entry->text));
         PyList_SetItem(py_entry, i++, entry->file ? PyUnicode_FromString(entry->file)
: inc_none());

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/385bbe9e/tests/system_tests_qdmanage.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_qdmanage.py b/tests/system_tests_qdmanage.py
index 15012ce..49b7177 100644
--- a/tests/system_tests_qdmanage.py
+++ b/tests/system_tests_qdmanage.py
@@ -225,7 +225,7 @@ class QdmanageTest(TestCase):
 
     def test_get_log(self):
         log = json.loads(self.run_qdmanage("get-log limit=1"))[0]
-        self.assertEquals(['AGENT', 'trace'], log[0:2])
+        self.assertEquals(['AGENT', 'debug'], log[0:2])
         self.assertRegexpMatches(log[2], 'get-log')
 
     def test_get_logstats(self):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/385bbe9e/tests/system_tests_qdstat.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_qdstat.py b/tests/system_tests_qdstat.py
index 7ce1052..45040f0 100644
--- a/tests/system_tests_qdstat.py
+++ b/tests/system_tests_qdstat.py
@@ -102,7 +102,7 @@ class QdstatTest(system_test.TestCase):
         assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out)
 
     def test_log(self):
-        self.run_qdstat(['--log',  '--limit=5'], r'AGENT \(trace\).*GET-LOG')
+        self.run_qdstat(['--log',  '--limit=5'], r'AGENT \(debug\).*GET-LOG')
 
 try:
     SSLDomain(SSLDomain.MODE_CLIENT)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message