diff options
author | Rob Austein <sra@hactrn.net> | 2009-12-28 18:09:23 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-12-28 18:09:23 +0000 |
commit | e3f985e48c6949f8b1ba7f3b7dce85e59a68738d (patch) | |
tree | 19f814c59927a850ce258f8328eaf418e3a0c53b /rpkid/rpki/config.py | |
parent | 39d9cb9dec12595c3ca5a705342de469d3717875 (diff) |
Start adding config file control for all the weird little debugging
and tuning parameters. This may require refactoring eventually, but
it's better than having to modify the source code every time.
svn path=/rpkid/irdbd.py; revision=2911
Diffstat (limited to 'rpkid/rpki/config.py')
-rw-r--r-- | rpkid/rpki/config.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/rpkid/rpki/config.py b/rpkid/rpki/config.py index 07f6bfe3..36fcbd2d 100644 --- a/rpkid/rpki/config.py +++ b/rpkid/rpki/config.py @@ -125,3 +125,43 @@ class parser(object): Get an integer option, perhaps with a default value. """ return self._get_wrapper(self.cfg.getint, section, option, default) + + def set_debugging_flags(self): + """ + Consolidated control for all the little debugging controls + scattered through the libraries. This doesn't really fit + anywhere, it's a method of the parser class because it operates on + the parser object and thus fits here less badly than anywhere else. + """ + + import rpki.https, rpki.x509, rpki.sql, rpki.async + + try: + rpki.https.debug_http = self.getboolean("debug_http") + except: + pass + + try: + rpki.https.debug_tls_certs = self.getboolean("debug_tls_certs") + except: + pass + + try: + rpki.x509.CMS_object.debug_cms_certs = self.getboolean("debug_cms_certs") + except: + pass + + try: + rpki.sql.sql_persistent.sql_debug = self.getboolean("sql_debug") + except: + pass + + try: + rpki.async.timer.gc_debug = self.getboolean("gc_debug") + except: + pass + + try: + rpki.async.timer.run_debug = self.getbolean("timer_debug") + except: + pass |