# !/usr/bin/env python
# -*- coding:utf-8 -*-
"""
    @File   : 'app.py'
    @Author : 'jonah'
    @Date   : '2015-09-12 14:44'
    @About  : 'Tornado app'
"""

import tornado.ioloop
import tornado.web
import tornado.wsgi
import os
import log


class TestHandler(tornado.web.RequestHandler):
    def data_received(self, chunk):
        pass

    def get(self, *args, **kwargs):
        log.info('This is a info message')
        log.error('This is a error message')
        self.render("index.html")


settings = {
    "static_path": os.path.join(os.path.dirname(__file__), "static"),
    "template_path": os.path.join(os.path.dirname(__file__), "templates"),
    "debug": True,
}

app = tornado.wsgi.WSGIApplication([
    ("/", TestHandler),
], **settings)
