diff --git a/eshop_project/settings/base.py b/eshop_project/settings/base.py index f23ad26..dc1583d 100644 --- a/eshop_project/settings/base.py +++ b/eshop_project/settings/base.py @@ -204,7 +204,7 @@ LOGGING = { 'production_file': { 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', - 'filename': '/var/log/eshop_main_prod.log', + 'filename': 'logs/eshop_main_prod.log', 'maxBytes': 1024*1024*5, 'backupCount': 7, 'formatter': 'main_formatter', @@ -213,7 +213,7 @@ LOGGING = { 'debug_file': { 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', - 'filename': '/var/log/eshop_main_dev.log', + 'filename': 'logs/eshop_main_dev.log', 'maxBytes': 1024*1024*5, 'backupCount': 7, 'formatter': 'main_formatter', diff --git a/eshop_project/settings/production.py b/eshop_project/settings/production.py index 965edef..d8bcde5 100644 --- a/eshop_project/settings/production.py +++ b/eshop_project/settings/production.py @@ -22,3 +22,7 @@ EMAIL_HOST = EMAIL_CONFIG.get('EMAIL_HOST') EMAIL_PORT = EMAIL_CONFIG.get('EMAIL_PORT') EMAIL_HOST_USER = EMAIL_CONFIG.get('EMAIL_HOST_USER') EMAIL_HOST_PASSWORD = EMAIL_CONFIG.get('EMAIL_HOST_PASSWORD') + +# Logging +LOGGING['handlers']['production_file'] = '../logs/eshop_main_prod.log' +LOGGING['handlers']['debug_file'] = '../logs/eshop_main_prod.log'