Example #1
0
 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)
Example #2
0
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()
Example #3
0
 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())
Example #4
0
    def run(self):
        from rmake.lib import logger
        logger.setupLogging(consoleLevel=logger.logging.DEBUG)

        self.run_builder(self.getData())
Example #5
0
 def __init__(self):
     self._logFile = None
     rmake_log.setupLogging(consoleLevel=logging.WARNING)
     options.MainHandler.__init__(self)