From a423419eca285d0b23ad3f31956297851a608d22 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 14 Mar 2021 10:45:36 +0300 Subject: Adds Logging Support Adds formatters and handlers for logging. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- backend/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backend/__init__.py') diff --git a/backend/__init__.py b/backend/__init__.py index 220b457..f8b0afe 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -1,3 +1,5 @@ +import logging + import sentry_sdk from sentry_sdk.integrations.asgi import SentryAsgiMiddleware from starlette.applications import Starlette @@ -6,6 +8,7 @@ from starlette.middleware.authentication import AuthenticationMiddleware from starlette.middleware.cors import CORSMiddleware from backend import constants +from backend import logs # This has to be imported before other logging statements from backend.authentication import JWTAuthenticationBackend from backend.middleware import DatabaseMiddleware, ProtectedDocsMiddleware from backend.route_manager import create_route_map -- cgit v1.2.3