gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-taler-util] 10/51: Very first draft for solving #445


From: gnunet
Subject: [GNUnet-SVN] [taler-taler-util] 10/51: Very first draft for solving #4453.
Date: Mon, 23 Sep 2019 22:02:01 +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 6f3bb22276f5c3db6581258b5f0ceda8c0bc3c5c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Feb 1 19:24:35 2019 +0100

    Very first draft for solving #4453.
---
 python/log/gnunet_log.py | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/python/log/gnunet_log.py b/python/log/gnunet_log.py
old mode 100644
new mode 100755
index e69de29..91fe852
--- a/python/log/gnunet_log.py
+++ b/python/log/gnunet_log.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+
+# GNUNET_FORCE_LOG format [component];[file];[function];[from line [to 
line]];loglevel
+
+import os
+
+class GnunetLogger:
+
+    def __init__(self, component):
+        self.component = component
+
+    def wmn(self):
+        print(self.component)
+
+    def log(self):
+        if not os.environ.get("GNUNET_FORCE_LOG"):
+            return
+        gfl = os.environ.get("GNUNET_FORCE_LOG")
+        gfl_split = gfl.split("/")
+        for component in gfl_split:
+            gfl_split_split = gfl_split.split(";")
+            if 4 != len(gfl_split_split):
+                print("warning: GNUNET_FORCE_LOG is malformed")
+                return
+            # if component chunk is not empty and different from
+            # this component name, then abort, otherwise further
+            # proceed.
+            if gfl_split_split[0] and self.component != gfl_split_split[0]:
+                return

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



reply via email to

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