2019-06-28 15:34:37 +00:00
|
|
|
from sys import stderr
|
|
|
|
|
2018-06-29 20:53:44 +00:00
|
|
|
from tornado.ioloop import IOLoop
|
|
|
|
|
2019-07-24 14:47:03 +00:00
|
|
|
from tfw.main import TFWServer, setup_signal_handlers
|
2019-06-28 15:34:37 +00:00
|
|
|
from tfw.config import TFWENV
|
|
|
|
from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter
|
2018-06-29 20:53:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2019-06-28 15:34:37 +00:00
|
|
|
Logger([
|
|
|
|
Log(stderr, LogFormatter(20)),
|
|
|
|
Log(TFWENV.LOGFILE, VerboseLogFormatter())
|
|
|
|
]).start()
|
2019-06-04 11:58:03 +00:00
|
|
|
TFWServer().listen()
|
2019-07-24 14:47:03 +00:00
|
|
|
|
|
|
|
setup_signal_handlers()
|
2018-06-29 20:53:44 +00:00
|
|
|
IOLoop.instance().start()
|