def main(): global logger tornado.options.parse_command_line() import trace trace.init(os.path.join(settings['log_path'], 'wnl'), options.port) logger = trace.logger('bidong', False) logger.setLevel(logging.INFO) bidong_pid = os.path.join(settings['run_path'], 'wnl/p_{}.pid'.format(options.port)) with open(bidong_pid, 'w') as f: f.write('{}'.format(os.getpid())) app = Application() app.listen(options.port, xheaders=app.settings.get('xheaders', False)) io_loop = tornado.ioloop.IOLoop.instance() logger.info('Special Server Listening : {} Started'.format(options.port)) io_loop.start()
def main(): global logger tornado.options.parse_command_line() import trace trace.init(settings['LOG_NIOT_PATH'], options.port) logger = trace.logger('niot', False) logger.setLevel(logging.INFO) niot_pid = os.path.join(settings['RUN_PATH'], 'p_{}.pid'.format(options.port)) with open(niot_pid, 'w') as f: f.write('{}'.format(os.getpid())) app = Application() app.listen(options.port, xheaders=app.settings.get('xheaders', False)) io_loop = tornado.ioloop.IOLoop.instance() logger.info('Niot Main-WEB Server Listening:{} Started'.format(options.port)) io_loop.start()
def main(): global logger tornado.options.parse_command_line() import trace trace.init(settings["LOG_NIOT_PATH"], options.port) logger = trace.logger("niot", False) logger.setLevel(logging.INFO) niot_pid = os.path.join(settings["RUN_PATH"], "p_{}.pid".format(options.port)) with open(niot_pid, "w") as f: f.write("{}".format(os.getpid())) app = Application() app.listen(options.port, xheaders=app.settings.get("xheaders", False)) io_loop = tornado.ioloop.IOLoop.instance() logger.info("Niot Main-WEB Server Listening:{} Started".format(options.port)) io_loop.start()
def main(): global logger tornado.options.parse_command_line() import trace trace.init(settings['LOG_NIOT_PATH'], options.port) logger = trace.logger('niot', False) logger.setLevel(logging.INFO) niot_pid = os.path.join(settings['RUN_PATH'], 'p_{}.pid'.format(options.port)) with open(niot_pid, 'w') as f: f.write('{}'.format(os.getpid())) app = Application() app.listen(options.port, xheaders=app.settings.get('xheaders', False)) io_loop = tornado.ioloop.IOLoop.instance() logger.info('Niot Main-WEB Server Listening:{} Started'.format( options.port)) io_loop.start()