From 39d9cb9dec12595c3ca5a705342de469d3717875 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 25 Dec 2009 21:33:00 +0000 Subject: Change logging default back to using syslog; add -d/--debug switch to all daemons to support logging to stderr. svn path=/myrpki/yamltest.py; revision=2910 --- rpkid/pubd.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'rpkid/pubd.py') diff --git a/rpkid/pubd.py b/rpkid/pubd.py index ec6f3fcf..82f3fb93 100644 --- a/rpkid/pubd.py +++ b/rpkid/pubd.py @@ -150,23 +150,25 @@ class pubd_context(object): os.environ["TZ"] = "UTC" time.tzset() -rpki.log.init("pubd") - cfg_file = "pubd.conf" profile = False -opts, argv = getopt.getopt(sys.argv[1:], "c:hp:?", ["config=", "help"]) +opts, argv = getopt.getopt(sys.argv[1:], "c:dhp:?", ["config=", "debug", "help"]) for o, a in opts: if o in ("-h", "--help", "-?"): print __doc__ sys.exit(0) elif o in ("-c", "--config"): cfg_file = a + elif o in ("-d", "--debug"): + rpki.log.use_syslog = False elif o in ("-p", "--profile"): profile = a if argv: raise RuntimeError, "Unexpected arguments %s" % argv +rpki.log.init("pubd") + def main(): cfg = rpki.config.parser(cfg_file, "pubd") -- cgit v1.2.3