baseimage-tutorial-framework/supervisor/tfw_server.py
2019-07-24 16:47:03 +02:00

19 lines
445 B
Python

from sys import stderr
from tornado.ioloop import IOLoop
from tfw.main import TFWServer, setup_signal_handlers
from tfw.config import TFWENV
from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter
if __name__ == '__main__':
Logger([
Log(stderr, LogFormatter(20)),
Log(TFWENV.LOGFILE, VerboseLogFormatter())
]).start()
TFWServer().listen()
setup_signal_handlers()
IOLoop.instance().start()