baseimage-tutorial-framework/supervisor/tfw_server.py

17 lines
393 B
Python

from sys import stderr
from tornado.ioloop import IOLoop
from tfw.main import TFWServer
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()
IOLoop.instance().start()