Revision 551b6283 lib/daemon.py

b/lib/daemon.py
245 245
  optionparser.add_option("-d", "--debug", dest="debug",
246 246
                          help="Enable some debug messages",
247 247
                          default=False, action="store_true")
248
  optionparser.add_option("--syslog", dest="syslog",
249
                          help="Enable logging to syslog (except debug"
250
                          " messages); one of 'no', 'yes' or 'only' [%s]" %
251
                          constants.SYSLOG_USAGE,
252
                          default=constants.SYSLOG_USAGE,
253
                          choices=["no", "yes", "only"])
248 254
  if daemon_name in constants.DAEMONS_PORTS:
249 255
    # for networked daemons we also allow choosing the bind port and address.
250 256
    # by default we use the port provided by utils.GetDaemonPort, and bind to
......
296 302
    utils.SetupLogging(logfile=constants.DAEMONS_LOGFILES[daemon_name],
297 303
                       debug=options.debug,
298 304
                       stderr_logging=not options.fork,
299
                       multithreaded=multithread)
305
                       multithreaded=multithread,
306
                       program=daemon_name,
307
                       syslog=options.syslog)
300 308
    logging.info("%s daemon startup", daemon_name)
301 309
    exec_fn(options, args)
302 310
  finally:

Also available in: Unified diff