diff --git a/padelclub_backend/settings.py b/padelclub_backend/settings.py index 31e51fb..4859194 100644 --- a/padelclub_backend/settings.py +++ b/padelclub_backend/settings.py @@ -168,6 +168,9 @@ AUTHENTICATION_BACKENDS = [ CSRF_COOKIE_SECURE = True # if using HTTPS SESSION_COOKIE_SECURE = True +LOGS_DIR = os.path.join(BASE_DIR, 'logs') +os.makedirs(LOGS_DIR, exist_ok=True) + LOGGING = { 'version': 1, 'disable_existing_loggers': False, @@ -196,7 +199,7 @@ LOGGING = { 'rotating_file': { 'level': 'INFO', 'class': 'logging.handlers.RotatingFileHandler', - 'filename': os.path.join(BASE_DIR, 'django.log'), + 'filename': os.path.join(LOGS_DIR, 'django.log'), 'maxBytes': 10 * 1024 * 1024, 'backupCount': 10, 'formatter': 'verbose',