Skip to content

Commit 4378fbe

Browse files
committed
adding basicConfig for logging
1 parent eb410b4 commit 4378fbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

application/db/session.py

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
from application.settings import get_settings
66
from contextlib import contextmanager
77

8+
logging.basicConfig(
9+
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
10+
)
811
# Set up logging
912
logger = logging.getLogger(__name__)
1013

@@ -31,6 +34,7 @@ def _create_engine():
3134

3235

3336
def get_session() -> Iterator[Session]:
37+
logger.info("hello")
3438
db = SessionLocal()
3539
try:
3640
yield db

0 commit comments

Comments
 (0)