logger
This commit is contained in:
@@ -3,6 +3,10 @@ from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_bcrypt import Bcrypt
|
||||
from flask_login import LoginManager
|
||||
import os
|
||||
import logging
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
|
||||
@@ -21,4 +25,5 @@ if not os.path.exists('site.db'):
|
||||
db.create_all()
|
||||
|
||||
if __name__ == '__main__':
|
||||
logger.info("Starting application...")
|
||||
app.run(debug=True)
|
||||
|
||||
Reference in New Issue
Block a user