[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.
- [GNUnet-SVN] [taler-taler-util] branch master created (now 3e2d0fb), gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 01/51: readme, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 08/51: Update python config module., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 09/51: empty module, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 03/51: amount version 0.1. Basically has some new exceptions, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 10/51: Very first draft for solving #4453.,
gnunet <=
- [GNUnet-SVN] [taler-taler-util] 05/51: First commit for #4453., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 02/51: adding amount lib, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 04/51: add talerconfig and linted amount, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 06/51: remove old config, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 07/51: Update "config" module (with one that implements @INLINE@)., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 14/51: log test, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 12/51: make map static, gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 25/51: 4453. Parsing line interval., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 11/51: Towards a usable solution for #4453., gnunet, 2019/09/23
- [GNUnet-SVN] [taler-taler-util] 13/51: Give loglevels dedicate class + test., gnunet, 2019/09/23