import logging from sys import stderr from tornado.ioloop import IOLoop from tfw.components.pipe_io import PipeIOHandler from tfw.config import TFWENV from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter from tfw.main import EventHandlerFactory, setup_signal_handlers LOG = logging.getLogger(__name__) def main(): # pylint: disable=unused-variable Logger([ Log(stderr, LogFormatter(20)), Log(TFWENV.LOGFILE, VerboseLogFormatter()) ]).start() eh_factory = EventHandlerFactory() json_pipe_eh = eh_factory.build(PipeIOHandler( '/tmp/tfw_send', '/tmp/tfw_recv' )) setup_signal_handlers() IOLoop.instance().start() if __name__ == '__main__': main()