Revision 3329f4de lib/daemon.py
b/lib/daemon.py | ||
---|---|---|
41 | 41 |
from ganeti import ssconf |
42 | 42 |
from ganeti import runtime |
43 | 43 |
from ganeti import compat |
44 |
from ganeti import pathutils |
|
44 | 45 |
|
45 | 46 |
|
46 | 47 |
class SchedulerBreakout(Exception): |
... | ... | |
778 | 779 |
if check_fn is not None: |
779 | 780 |
check_fn(options, args) |
780 | 781 |
|
782 |
log_filename = pathutils.GetLogFilename(daemon_name) |
|
783 |
|
|
781 | 784 |
if options.fork: |
782 | 785 |
utils.CloseFDs() |
783 |
(wpipe, stdio_reopen_fn) = \ |
|
784 |
utils.Daemonize(logfile=constants.DAEMONS_LOGFILES[daemon_name]) |
|
786 |
(wpipe, stdio_reopen_fn) = utils.Daemonize(logfile=log_filename) |
|
785 | 787 |
else: |
786 | 788 |
(wpipe, stdio_reopen_fn) = (None, None) |
787 | 789 |
|
788 | 790 |
log_reopen_fn = \ |
789 |
utils.SetupLogging(constants.DAEMONS_LOGFILES[daemon_name], daemon_name,
|
|
791 |
utils.SetupLogging(log_filename, daemon_name,
|
|
790 | 792 |
debug=options.debug, |
791 | 793 |
stderr_logging=not options.fork, |
792 | 794 |
multithreaded=multithreaded, |
Also available in: Unified diff