[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-taler-util] 39/51: Log: fix line interval parsing (c
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-taler-util] 39/51: Log: fix line interval parsing (care about one number case.) |
Date: |
Mon, 23 Sep 2019 22:02:30 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository taler-util.
commit 4d3765b550576ab39f06aa3248fcc968e548ecb7
Author: Marcello Stanisci <address@hidden>
AuthorDate: Sun Feb 10 18:11:00 2019 +0100
Log: fix line interval parsing (care about one number case.)
---
python/log/gnunet_log.py | 3 ++-
python/log/test.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/python/log/gnunet_log.py b/python/log/gnunet_log.py
index 82233cf..99f221a 100755
--- a/python/log/gnunet_log.py
+++ b/python/log/gnunet_log.py
@@ -23,7 +23,8 @@ class LogDefinition:
interval_re = "^([0-9]+)(-([0-9]+))?$"
match = re.match(interval_re, line_interval)
if match:
- return dict(min=int(match.group(1)), max=int(match.group(3)))
+ return dict(min=int(match.group(1)),
+ max=int(match.group(3) if match.group(3) else
match.group(1)))
# just match every line if bad interval was provided.
return dict(min=0, max=float("inf"))
diff --git a/python/log/test.py b/python/log/test.py
index b2f316e..6a94c1f 100755
--- a/python/log/test.py
+++ b/python/log/test.py
@@ -94,7 +94,7 @@ class TestGnunetLog(TestCase):
@patch("logging.basicConfig")
def test_non_forced_env(self, mocked_basicConfig, mocked_setLevel):
assert None == os.environ.get("GNUNET_FORCE_LOG")
- os.environ["GNUNET_LOG"] =
"gnunet-pylog;test.py;test_non_forced_env;80-150;ERROR"
+ os.environ["GNUNET_LOG"] =
"gnunet-pylog;test.py;test_non_forced_env;99;ERROR" # lineno is not 100%
accurate.
gl = GL("gnunet-pylog")
gl.log("msg", gl.DEBUG)
mocked_setLevel.assert_called_with(level=logging.ERROR)
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [taler-taler-util] 23/51: fetch caller's metadata., (continued)
- [GNUnet-SVN] [taler-taler-util] 23/51: fetch caller's metadata., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 29/51: rename function, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 30/51: Testing env var GNUNET_LOG., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 32/51: 4453. Testing mixed situation,, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 37/51: fix after file rename, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 38/51: 4453. Test GNUNET_FORCE_LOGFILE., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 50/51: Make tests work again., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 33/51: 4453. Test manual loglevel setup and nonforced env., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 27/51: syntax, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 34/51: 4453. Test for GNUNET_LOG and GNUNET_FORCE_LOG both defined., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 39/51: Log: fix line interval parsing (care about one number case.),
gnunet <=
- [GNUnet-SVN] [taler-taler-util] 31/51: 4453. Test only manual loglevel setup., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 28/51: Testing 4453 with unittest. First batch., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 43/51: Add a .dir-locals, el for configuring emacs for this project, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 44/51: ux, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 46/51: gitignore, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 36/51: Remove old test, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 45/51: rename., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 35/51: 4453. Fix GNUNET_FORCE_LOG priority., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 40/51: Doxygen-commenting gnunet_log.py, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 41/51: Doxygen-comment logger test cases., gnunet, 2019/09/23