コード例 #1
0
ファイル: daemon.py プロジェクト: pombreda/rmake3
 def setup(self, **kwargs):
     if kwargs['fork']:
         consoleLevel = None
     elif kwargs['debug']:
         consoleLevel = logging.DEBUG
     else:
         consoleLevel = logging.INFO
     rmake_log.setupLogging(logPath=self.getLogPath(),
             fileLevel=logging.INFO, consoleLevel=consoleLevel,
             fileFormat='file', consoleFormat='file',
             withTwisted=True)
     super(LoggingMixin, self).setup(**kwargs)
コード例 #2
0
ファイル: bootstrap.py プロジェクト: pombreda/rmake3
def main(childClassName):
    from twisted.internet import reactor

    logger.setupLogging(withTwisted=True, consoleLevel=logging.INFO)

    # setpgrp prevents Ctrl-C at the command line from killing workers
    # directly.  Instead, the parent process catches the signal, flags all the
    # workers as shutting down, and kills the workers itself. This way no
    # exception is raised if the workers terminate abruptly.
    os.setpgrp()

    childClass = reflect.namedAny(childClassName)
    child = childClass()
    stdio.StandardIO(child, connector.TO_CHILD, connector.FROM_CHILD)

    reactor.run()
コード例 #3
0
ファイル: worker.py プロジェクト: pombreda/rmake3
 def run_builder(self, job):
     from rmake.lib import logger
     logger.setupLogging(consoleLevel=logger.logging.DEBUG)
     buildJob = self.task.task_data.getObject()
     self.log.info("Building trove %s", buildJob.trove.getTroveString())
コード例 #4
0
ファイル: worker.py プロジェクト: pombreda/rmake3
    def run(self):
        from rmake.lib import logger
        logger.setupLogging(consoleLevel=logger.logging.DEBUG)

        self.run_builder(self.getData())
コード例 #5
0
ファイル: daemon.py プロジェクト: pombreda/rmake3
 def __init__(self):
     self._logFile = None
     rmake_log.setupLogging(consoleLevel=logging.WARNING)
     options.MainHandler.__init__(self)