Refactor TFW logging

This commit is contained in:
R. Richard
2019-06-28 17:34:37 +02:00
committed by Kristóf Tóth
parent f94c5b0c37
commit 68a6469d23
2 changed files with 63 additions and 36 deletions

View File

@ -1,10 +1,16 @@
from sys import stderr
from tornado.ioloop import IOLoop
from tfw.config.log import TFWLog
from tfw.server import TFWServer
from tfw.config import TFWENV
from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter
if __name__ == '__main__':
TFWLog().start()
Logger([
Log(stderr, LogFormatter(20)),
Log(TFWENV.LOGFILE, VerboseLogFormatter())
]).start()
TFWServer().listen()
IOLoop.instance().start()