[Fuego] [PATCH] dprint: add DEBUG keyword

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Mon Jun 4 07:22:22 UTC 2018


We also remove it from pvar

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/scripts/ftc | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/engine/scripts/ftc b/engine/scripts/ftc
index d474524..a9c0c4f 100755
--- a/engine/scripts/ftc
+++ b/engine/scripts/ftc
@@ -61,14 +61,6 @@ VERSION = (1, 3, 0)
 # define these as globals
 log = None
 tail_fd = None
-
-
-# here's a utility routine to print a variable with it's name and value
-def pvar(name):
-    caller = sys._getframe(1)
-    print "DEBUG: python var %s=%s" % (name, caller.f_locals[name])
-
-
 quiet = 0
 verbose = 0
 debug = 0
@@ -413,10 +405,13 @@ criteria are specified, all requests on the server are listed.
 
 def dprint(msg):
     global debug
-
     if debug:
-        print(msg)
+        print("DEBUG: " + msg)
 
+# here's a utility routine to print a variable with it's name and value
+def pvar(name):
+    caller = sys._getframe(1)
+    dprint("python var %s=%s" % (name, caller.f_locals[name]))
 
 class config_class:
     def __init__(self, config_path):
-- 
2.7.4




More information about the Fuego mailing list