Beispiel #1
0
    def __init__(self, pidfile=None,
                 logfile=None,
                 stdin="/dev/null",
                 stdout="/dev/null",
                 stderr="/dev/null"):
        daemon.__init__(self, pidfile, stdin, stdout, stderr)

        # The logfile's verbose flag is on by default.
        self.log = debug.logfile(logfile)
        self.log.verbose = True

        # Debug has to be turned on explicitly using -d.
        self.dlog = debug.tee(self.log, debug.logstream())
        self.dlog.verbose = True

        self.log.timestamp = True
        self.dlog.timestamp = True
Beispiel #2
0
 def debug(self):
     self.log = debug.tee(self.log, debug.logstream())
     self.log.verbose = True
     
     daemon.debug(self)