Beispiel #1
0
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()
Beispiel #2
0
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()
Beispiel #3
0
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()
Beispiel #4
0
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()