chiark / gitweb /
config: a bit more debugging
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Apr 2017 01:23:56 +0000 (02:23 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Apr 2017 01:23:56 +0000 (02:23 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
hippotat
hippotatlib/__init__.py

index 96a3f21..18cd14e 100755 (executable)
--- a/hippotat
+++ b/hippotat
@@ -243,6 +243,8 @@ def process_cfg(_opts, putative_servers, putative_clients):
       sections = cfg_process_client_common(c,ss,cs,ci)
       if not sections: continue
 
+      log_debug_config('processing client [%s %s]' % (ss, cs))
+
       def srch(getter,key): return cfg_search(getter,key,sections)
 
       c.http_timeout   += srch(cfg.getint, 'http_timeout_grace')
index 9b10fdf..397dfb2 100644 (file)
@@ -525,6 +525,10 @@ def cfg_process_ipif(c, sections, varmap):
 
 #---------- startup ----------
 
+def log_debug_config(m):
+  if not DBG.CONFIG in debug_set: return
+  print('DBG.CONFIG:', m)
+
 def common_startup(process_cfg):
   # calls process_cfg(putative_clients, putative_servers)
 
@@ -536,7 +540,7 @@ def common_startup(process_cfg):
   def readconfig(pathname, mandatory=True):
     def log(m, p=pathname):
       if not DBG.CONFIG in debug_set: return
-      print('DBG.CONFIG: %s: %s' % (m, pathname))
+      log_debug_config('%s: %s' % (m, pathname))
 
     try:
       files = os.listdir(pathname)