diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index c8b8da60a2..80162c4a69 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -408,7 +408,7 @@ LOGGING = { 'level': 'WARNING', 'class':'logging.handlers.RotatingFileHandler', 'filters': ['require_debug_false'], - 'filename': '/var/log/awx/tower_warnings.log', + 'filename': os.path.join(BASE_DIR, 'tower_warnings.log'), 'maxBytes': 1024*1024*5, # 5 MB 'backupCount': 5, 'formatter':'simple', diff --git a/awx/settings/production.py b/awx/settings/production.py index 5299d9c84b..3f811db5f7 100644 --- a/awx/settings/production.py +++ b/awx/settings/production.py @@ -40,6 +40,17 @@ INTERNAL_API_URL = 'http://127.0.0.1:80' # This directory should not be web-accessible JOBOUTPUT_ROOT = '/var/lib/awx/job_status/' + +LOGGING['handlers']['rotating_file'] = { + 'level': 'WARNING', + 'class':'logging.handlers.RotatingFileHandler', + 'filters': ['require_debug_false'], + 'filename': '/var/log/awx/tower_warnings.log', + 'maxBytes': 1024*1024*5, # 5 MB + 'backupCount': 5, + 'formatter':'simple', +} + # Load settings from any .py files in the global conf.d directory specified in # the environment, defaulting to /etc/awx/conf.d/. settings_dir = os.environ.get('AWX_SETTINGS_DIR', '/etc/awx/conf.d/')