aboutsummaryrefslogtreecommitdiff
path: root/ca
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-05-30 17:08:31 +0000
committerRob Austein <sra@hactrn.net>2014-05-30 17:08:31 +0000
commit3519e8117e959ec35fa701986215d5fb18e553f1 (patch)
tree6defac145f43d1fe1a6ab90bdef36d25a66b6d09 /ca
parent6cacde4474719bae1a1e6ba0876b9d3327054ae9 (diff)
Move all the complexity of configuring the ten zillion kinds of
logging handlers up front to the argparse stage, thereby also giving the application more control over the default logging configuration. svn path=/trunk/; revision=5851
Diffstat (limited to 'ca')
-rw-r--r--ca/tests/smoketest.py3
-rw-r--r--ca/tests/yamlconf.py3
-rw-r--r--ca/tests/yamltest.py3
3 files changed, 6 insertions, 3 deletions
diff --git a/ca/tests/smoketest.py b/ca/tests/smoketest.py
index 64fd6173..04b43f07 100644
--- a/ca/tests/smoketest.py
+++ b/ca/tests/smoketest.py
@@ -159,7 +159,8 @@ def main():
Main program.
"""
- rpki.log.init(smoketest_name, argparse.Namespace(log_level = logging.DEBUG, log_stream = sys.stdout))
+ rpki.log.init(smoketest_name, argparse.Namespace(log_level = logging.DEBUG,
+ log_handler = lambda: logging.StreamHandler(sys.stdout)))
logger.info("Starting")
pubd_process = None
diff --git a/ca/tests/yamlconf.py b/ca/tests/yamlconf.py
index 5025ef61..e9b6e391 100644
--- a/ca/tests/yamlconf.py
+++ b/ca/tests/yamlconf.py
@@ -673,7 +673,8 @@ def main():
quiet = args.quiet
yaml_file = args.yaml_file
- rpki.log.init("yamlconf", argparse.Namespace(log_level = logging.DEBUG, log_stream = sys.stdout))
+ rpki.log.init("yamlconf", argparse.Namespace(log_level = logging.DEBUG,
+ log_handler = lambda: logging.StreamHandler(sys.stdout)))
# Allow optional config file for this tool to override default
# passwords: this is mostly so that I can show a complete working
diff --git a/ca/tests/yamltest.py b/ca/tests/yamltest.py
index 5d6686b4..59d58cd9 100644
--- a/ca/tests/yamltest.py
+++ b/ca/tests/yamltest.py
@@ -666,7 +666,8 @@ try:
if args.pidfile is not None:
open(args.pidfile, "w").write("%s\n" % os.getpid())
- rpki.log.init("yamltest", argparse.Namespace(log_level = logging.DEBUG, log_stream = sys.stdout))
+ rpki.log.init("yamltest", argparse.Namespace(log_level = logging.DEBUG,
+ log_handler = lambda: logging.StreamHandler(sys.stdout)))
# Allow optional config file for this tool to override default
# passwords: this is mostly so that I can show a complete working