diff --git a/eox_core/middleware.py b/eox_core/middleware.py index 61a571525..dbca630b6 100644 --- a/eox_core/middleware.py +++ b/eox_core/middleware.py @@ -28,6 +28,8 @@ from eox_core.models import Redirection from eox_core.utils import cache, fasthash +LOG = logging.getLogger(__name__) + try: from eox_tenant.pipeline import EoxTenantAuthException except ImportError: @@ -35,12 +37,12 @@ class EoxTenantAuthException: """Dummy eox-tenant Exception.""" + LOG.warning("ImportError while importing %s", EoxTenantAuthException) + configuration_helper = get_configuration_helper() # pylint: disable=invalid-name ExceptionMiddleware = get_tpa_exception_middleware() -LOG = logging.getLogger(__name__) - class PathRedirectionMiddleware(MiddlewareMixin): """ diff --git a/eox_core/settings/production.py b/eox_core/settings/production.py index 98ab941c0..21de41eed 100644 --- a/eox_core/settings/production.py +++ b/eox_core/settings/production.py @@ -1,13 +1,18 @@ """ Settings for eox_core project meant to be called on the edx-platform/*/envs/aws.py module """ +import logging + from .common import * # pylint: disable=wildcard-import, unused-wildcard-import +LOG = logging.getLogger(__name__) + try: import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration except ImportError: sentry_sdk = DjangoIntegration = None + LOG.error("ImportError while importing %s", ImportError) def plugin_settings(settings): # pylint: disable=function-redefined