Created
October 25, 2014 07:32
-
-
Save lu911/b90be2d8f817cee66fa6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def init_log(app): | |
import os | |
if not os.path.exists('logs'): | |
os.makedirs('logs') | |
import logging | |
logging.basicConfig(filename='logs/db.log') | |
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment