Updated app.py

This commit is contained in:
cool.gitter.choco
2025-01-27 19:51:21 -06:00
parent df6256adfb
commit e2b48e702e
4 changed files with 7 additions and 1 deletions

2
.gitignore vendored
View File

@@ -19,3 +19,5 @@ routes/utils/__pycache__/search.cpython-312.pyc
routes/utils/__pycache__/__init__.cpython-312.pyc
routes/utils/__pycache__/credentials.cpython-312.pyc
routes/utils/__pycache__/search.cpython-312.pyc
routes/utils/__pycache__/credentials.cpython-312.pyc
routes/utils/__pycache__/search.cpython-312.pyc

6
app.py
View File

@@ -9,20 +9,24 @@ from routes.prgs import prgs_bp
import logging
import time
from pathlib import Path
import os
def create_app():
app = Flask(__name__)
# Configure basic logging
log_file='flask_server.log'
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(levelname)s %(name)s %(threadName)s : %(message)s',
handlers=[
logging.FileHandler('flask_server.log'),
logging.FileHandler(log_file),
logging.StreamHandler()
]
)
os.chmod(log_file, 0o666)
# Get Flask's logger
logger = logging.getLogger('werkzeug')
logger.setLevel(logging.INFO)

0
routes/utils/__pycache__/credentials.cpython-312.pyc Normal file → Executable file
View File

0
routes/utils/__pycache__/search.cpython-312.pyc Normal file → Executable file
View File