diff options
author | Rob Austein <sra@hactrn.net> | 2014-05-29 19:18:40 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-05-29 19:18:40 +0000 |
commit | e6047c9f737275d898d88737719dd09a6ee4f25c (patch) | |
tree | 2741504894c594473b574146b632d0433a5b7186 /ca/tests/smoketest.py | |
parent | 839c6b3650472ac6c66fe0dadc87ac419a5a70d4 (diff) |
Provide our own logging Formatter class rather than straining to
subclass the stock one. Replace all uses of rpki.log.traceback() with
logging package .exception() calls. Use LoggingAdapter for all the
whacky per-stream logging code in rpki.http. Fix default logging
priority for non-daemon programs like rpkic.
svn path=/trunk/; revision=5843
Diffstat (limited to 'ca/tests/smoketest.py')
-rw-r--r-- | ca/tests/smoketest.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ca/tests/smoketest.py b/ca/tests/smoketest.py index 87927a81..1f0215f2 100644 --- a/ca/tests/smoketest.py +++ b/ca/tests/smoketest.py @@ -159,7 +159,7 @@ def main(): Main program. """ - rpki.log.init(smoketest_name) + rpki.log.init(smoketest_name, argparse.Namespace(log_level = logging.DEBUG, log_stream = sys.stdout)) logger.info("Starting") pubd_process = None @@ -299,12 +299,9 @@ def main(): logger.info("Event loop exited normally") except Exception, e: - - logger.info("Event loop exited with an exception: %r" % e) - rpki.log.traceback(logger) + logger.exception("Event loop exited with an exception") finally: - logger.info("Cleaning up") for a in db.engines: a.kill_daemons() @@ -631,7 +628,7 @@ class allocation(object): def done(e): if isinstance(e, Exception): - rpki.log.traceback(logger) + logger.exception("Exception while rekeying %s", self.name) raise e cb() @@ -648,7 +645,7 @@ class allocation(object): def done(e): if isinstance(e, Exception): - rpki.log.traceback(logger) + logger.exception("Exception while revoking %s", self.name) raise e cb() @@ -1295,8 +1292,7 @@ def call_pubd(pdus, cb): cb(r_msg) def call_pubd_eb(e): - logger.warning("Problem calling pubd: %s" % e) - rpki.log.traceback(logger) + logger.exception("Problem calling pubd") rpki.http.client( url = q_url, |