Skip to content

Commit

Permalink
Remove "echo" config from SQLALCHEMY_ENGINE_OPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
lampham789 committed Aug 30, 2024
1 parent 7ce88d8 commit 4bbcff2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
from botocore.exceptions import ClientError


LOG_FORMAT = "[%(asctime)s] [%(levelname)s] [%(name)s] %(message)s"
DATE_FORMAT = "%Y-%m-%d %H:%M:%S %z"

logging.basicConfig(
level=logging.INFO,
format="[%(asctime)s] [%(levelname)s] [%(name)s] %(message)s",
datefmt="%Y-%m-%d %H:%M:%S %z"
format=LOG_FORMAT,
datefmt=DATE_FORMAT
)

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -63,6 +66,5 @@ class Config:
SQLALCHEMY_DATABASE_URI = get_database_uri()
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ENGINE_OPTIONS = {
"pool_pre_ping": True,
"echo": os.getenv("FLASK_ENV") != "production"
"pool_pre_ping": True
}

0 comments on commit 4bbcff2

Please sign in to comment.