Logger creation simplified

Este commit está contenido en:
Dirk Alders 2024-10-08 22:31:19 +02:00
padre 6b55e81816
commit c9532aaf37
Se han modificado 2 ficheros con 3 adiciones y 10 borrados

Ver fichero

@ -1,12 +1,9 @@
import logging
from django.conf import settings
from django.contrib.auth.signals import user_logged_in, user_logged_out, user_login_failed
from django.dispatch import receiver
try:
from config import APP_NAME as ROOT_LOGGER_NAME
except ImportError:
ROOT_LOGGER_NAME = 'root'
logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
logger = logging.getLogger(settings.ROOT_LOGGER_NAME).getChild(__name__)
@receiver(user_logged_in)

Ver fichero

@ -15,11 +15,7 @@ from themes import Context
import users
from users import parameter
try:
from config import APP_NAME as ROOT_LOGGER_NAME
except ImportError:
ROOT_LOGGER_NAME = 'root'
logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
logger = logging.getLogger(settings.ROOT_LOGGER_NAME).getChild(__name__)
def password_recovery(request):