# -*- coding: utf-8 -*-
from url_shortener import app

app.run()

# -*- coding: utf-8 -*-
from url_shortener import app

app.run()

if not app.debug:
    import logging
    from logging.handlers import TimedRotatingFileHandler
    file_handler = TimedRotatingFileHandler(app.config['LOG_FILE'])
    file_handler.setLevel(logging.WARNING)
    app.logger.addHandler(file_handler)

Add log file setup to run_server module