diff options
author | Rob Austein <sra@hactrn.net> | 2014-05-28 17:13:46 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-05-28 17:13:46 +0000 |
commit | dad61b8efaca22afd13e452f618a74f1d50dbb38 (patch) | |
tree | 85731e05debcc0a158df663147c16bfe8277afc4 /rpki/pubd.py | |
parent | 13134a0f8376c0cdffde344af319320257f39dbe (diff) |
Rework logging initialization code.
svn path=/trunk/; revision=5836
Diffstat (limited to 'rpki/pubd.py')
-rw-r--r-- | rpki/pubd.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rpki/pubd.py b/rpki/pubd.py index 31f22ed4..ec7be81e 100644 --- a/rpki/pubd.py +++ b/rpki/pubd.py @@ -53,24 +53,23 @@ class main(object): parser = argparse.ArgumentParser(description = __doc__) parser.add_argument("-c", "--config", help = "override default location of configuration file") - parser.add_argument("-d", "--debug", action = "store_true", - help = "enable debugging mode") parser.add_argument("-f", "--foreground", action = "store_true", help = "do not daemonize") parser.add_argument("--pidfile", help = "override default location of pid file") parser.add_argument("--profile", help = "enable profiling, saving data to PROFILE") + rpki.log.argparse_setup(parser) args = parser.parse_args() self.profile = args.profile - rpki.log.init("pubd", use_syslog = not args.debug) + rpki.log.init("pubd", args) self.cfg = rpki.config.parser(args.config, "pubd") self.cfg.set_global_flags() - if not args.foreground and not args.debug: + if not args.foreground: rpki.daemonize.daemon(pidfile = args.pidfile) if self.profile: |