From bc009486da0306314fb424700285798b817669cd Mon Sep 17 00:00:00 2001 From: Max Yakovenko Date: Fri, 13 Jul 2018 17:14:45 +0300 Subject: [PATCH] modified logging file path for production settings --- eshop_project/settings/base.py | 4 ++-- eshop_project/settings/production.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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'