def start_logging(self):
        """Configure the logging module"""
        try:
            level = int(self.loglevel)
        except __HOLE__:
            level = int(logging.getLevelName(self.loglevel.upper()))

        handlers = []
        if self.logfile:
            handlers.append(logging.FileHandler(self.logfile))
            self.chown(self.logfile)
        if not self.options.daemonize:
            # also log to stderr
            handlers.append(logging.StreamHandler())

        log = logging.getLogger()
        log.setLevel(level)
        for h in handlers:
            h.setFormatter(logging.Formatter(
                "%(asctime)s %(process)d %(levelname)s %(message)s"))
            log.addHandler(h)
dataset/ETHPy150Open kiberpipa/Intranet/pipa/ltsp/src/ltsp_usage_monitor/daemon.py/Daemon.start_logging