def main(): global LOG config = Config() LOG = logging.getLogger('dist_test.slave') dist_test.configure_logger(LOG, config.SLAVE_LOG) config.configure_auth() LOG.info("Starting slave") s = Slave(config) signal.signal(signal.SIGTERM, lambda sig, stack: s.handle_sigterm()) s.run()
$( "a.view" ).click(function() { $('#logModal .modal-title').text($(this).attr("viewheader")); $('#logModal .modal-body').load($(this).attr("viewlink"), function() { $('#logModal').modal(); }); }); }); </script> </body> </html> """) return template.render(body=body) if __name__ == "__main__": config = Config() LOG = logging.getLogger('dist_test.server') dist_test.configure_logger(LOG, config.SERVER_LOG) LOG.info("Writing access logs to %s", config.SERVER_ACCESS_LOG) LOG.info("Writing error logs to %s", config.SERVER_ERROR_LOG) cherrypy.config.update({ 'server.socket_host': '0.0.0.0', 'server.socket_port': 8081, 'log.access_file': config.SERVER_ACCESS_LOG, 'log.error_file': config.SERVER_ERROR_LOG, }) LOG.info("Starting server") cherrypy.quickstart(DistTestServer(config))
$('#logModal .modal-body').load($(this).attr("viewlink"), function() { $('#logModal').modal(); }); }); }); </script> </body> </html> """) return template.render(body=body) if __name__ == "__main__": config = Config() LOG = logging.getLogger('dist_test.server') dist_test.configure_logger(LOG, config.SERVER_LOG) LOG.info("Writing access logs to %s", config.SERVER_ACCESS_LOG) LOG.info("Writing error logs to %s", config.SERVER_ERROR_LOG) cherrypy.config.update({ 'server.socket_host': '0.0.0.0', 'server.socket_port': 8081, 'log.access_file': config.SERVER_ACCESS_LOG, 'log.error_file': config.SERVER_ERROR_LOG, }) LOG.info("Starting server") cherrypy.quickstart(DistTestServer(config))