def __init__(self, hostname, port, log_dir, filename, pidfile): """Constructor""" stdin = '/dev/null' stdout = os.path.join(log_dir, 'logging_error.log') stderr = os.path.join(log_dir, 'logging_error.log') Daemon.__init__(self, pidfile, stdin, stdout, stderr) self.hostname = hostname self.port = port #Set up logging # get logger, we will log to file fancylogger.logToScreen(False) # we want to log absolutely everything that's comming at us fancylogger.setLogLevel(0) self.logfile = os.path.join(log_dir, filename) fancylogger.logToFile(self.logfile) self.logger = fancylogger.getLogger() self.socket_ = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
def __init__(self, pidfile, zkrs_type, zkrs_options, zkrs_kwargs): self.zkrs_type = zkrs_type self.zkrs_options = zkrs_options self.zkrs_kwargs = zkrs_kwargs Daemon.__init__(self, pidfile)