gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-taler-util] 14/51: log test


From: gnunet
Subject: [GNUnet-SVN] [taler-taler-util] 14/51: log test
Date: Mon, 23 Sep 2019 22:02:05 +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 dc531f8e94177b978df8e99157828fc287c43f70
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Feb 4 19:19:49 2019 +0100

    log test
---
 python/log/test.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/python/log/test.py b/python/log/test.py
new file mode 100755
index 0000000..684a839
--- /dev/null
+++ b/python/log/test.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+from gnunet_log import GnunetLogger as GL
+import os
+
+gl = GL("gnunetish-python-logging", GL.INFO)
+
+# 1st test _without_ GNUNET_FORCE_LOG being defined.
+print("Testing with GNUNET_FORCE_LOG *unset*")
+if os.environ.get("GNUNET_FORCE_LOG"):
+    del os.environ["GNUNET_FORCE_LOG"]
+
+gl.log("I am a INFO message", GL.INFO)
+gl.log("I am a WARNING message", GL.WARNING)
+gl.log("I am a DEBUG message, and I should *not* get displayed", GL.WARNING)
+
+print("Testing with GNUNET_FORCE_LOG *set* to WARNING")
+os.environ["GNUNET_FORCE_LOG"] = "gnunetish-python-logging;;;;WARNING"
+
+gl.log("I am a INFO message, and I should *not* get displayed", GL.INFO)
+gl.log("I am a ERROR message, and I should get displayed", GL.ERROR)
+
+print("Testing with GNUNET_FORCE_LOG *set* to DEBUG")
+os.environ["GNUNET_FORCE_LOG"] = "gnunetish-python-logging;;;;DEBUG"
+gl.log("I am a DEBUG message, and I should get displayed", GL.DEBUG)

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]