From ebb0e6fdbe65320b19dc0bcf81bcad7caa015fb6 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Thu, 25 Oct 2018 20:37:15 +0300 Subject: [PATCH] updated edit to use log files --- modules/django.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/django.py b/modules/django.py index ffbc1bf..c2891d5 100644 --- a/modules/django.py +++ b/modules/django.py @@ -535,7 +535,7 @@ def generate_gunicorn(make_link=True): @task def edit(param='help'): """ - calls up mvim on the gunicorn conf file + calls up mvim on the gunicorn and django conf file """ from .maintenance import edit as maintenance_edit @@ -569,6 +569,8 @@ def edit(param='help'): django_path=django_path, project_branch=project_branch) + file_debug_handler = configuration.logging.django.handlers.file_debug + # locations = ['gunicorn', 'gunicorn_link', 'gunicorn_build', # 'settings', 'local'] locations = { @@ -590,7 +592,19 @@ def edit(param='help'): 'local': { 'path': settings_local_path, 'desc': 'local settings file for django project', - } + }, + + 'server_log': { + 'path': file_debug_handler.path.server, + 'desc': 'django server log - handler name: %s' % + file_debug_handler.name.server, + }, + + 'project_log': { + 'path': file_debug_handler.path.project, + 'desc': 'django project log - handler name: %s' % + file_debug_handler.name.project, + }, } if param in locations.keys():