From 01697787912f143ab2b9a938e33c73c9a8a9ae0b Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 26 Apr 2016 20:07:41 +0000 Subject: Further consolidation of config file parsing, command line parsing, and logging setup. Most programs now use the unified mechanism, although there are still a few holdouts: the GUI, which is a special case because it has no command line, and the rpki-rtr program, which, for historical reasons has its own implementation of the logging setup infrastructure. svn path=/branches/tk705/; revision=6390 --- ca/tests/yamlconf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ca/tests/yamlconf.py') diff --git a/ca/tests/yamlconf.py b/ca/tests/yamlconf.py index 2963a61f..db368320 100644 --- a/ca/tests/yamlconf.py +++ b/ca/tests/yamlconf.py @@ -670,8 +670,10 @@ def main(): quiet = args.quiet yaml_file = args.yaml_file - rpki.log.init("yamlconf", argparse.Namespace(log_level = logging.DEBUG, - log_handler = lambda: logging.StreamHandler(sys.stdout))) + log_handler = logging.StreamHandler(sys.stdout) + log_handler.setFormatter(rpki.config.Formatter("yamlconf", log_handler, logging.DEBUG)) + logging.getLogger().addHandler(log_handler) + logging.getLogger().setLevel(logging.DEBUG) # Allow optional config file for this tool to override default # passwords: this is mostly so that I can show a complete working -- cgit v1.2.3