diff --git a/apps/payment/tasks.py b/apps/payment/tasks.py index cc2e2f03..f61515e8 100644 --- a/apps/payment/tasks.py +++ b/apps/payment/tasks.py @@ -7,7 +7,7 @@ from django.conf import settings from project.celery import app -logger = logging.getLogger(__name__) +logger = logging.getLogger('project') @app.task diff --git a/project/settings.py b/project/settings.py index 3218b5a2..96db35d9 100644 --- a/project/settings.py +++ b/project/settings.py @@ -198,7 +198,6 @@ LOGGING = { }, 'log_file': { 'level': 'DEBUG', - 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler', 'formatter': 'verbose', }, @@ -215,22 +214,22 @@ LOGGING = { 'py.warnings': { 'handlers': ['console', ], }, - '': { + 'project': { 'handlers': ['console', 'log_file',], 'level': "INFO", }, } } -if os.path.exists(os.path.join(BASE_DIR, '/media/logs')): + +if os.path.exists(os.path.join(BASE_DIR, 'media/logs')): LOGGING['handlers']['log_file'] = { 'level': 'INFO', 'class': 'logging.handlers.RotatingFileHandler', 'filename': 'media/logs/main.log', - 'maxBytes': 1024 * 1024 * 15, # 5 MB + 'maxBytes': 1024 * 1024 * 15, 'backupCount': 7, 'formatter': 'verbose', - 'filters': ['require_debug_false'], } # Static files (CSS, JavaScript, Images)