diff options
author | Rob Austein <sra@hactrn.net> | 2009-12-25 21:33:00 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-12-25 21:33:00 +0000 |
commit | 39d9cb9dec12595c3ca5a705342de469d3717875 (patch) | |
tree | 5c84cd50ae52365bbbff7051a364a137ad57a934 /rpkid/pubd.py | |
parent | 56516d7fd4589c1f2dd460b3f111a9e8a07b5cc8 (diff) |
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
Diffstat (limited to 'rpkid/pubd.py')
-rw-r--r-- | rpkid/pubd.py | 8 |
1 files changed, 5 insertions, 3 deletions
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") |