1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Update packaging and production configuration for new logging

This commit is contained in:
Matthew Jones 2015-02-13 13:50:36 -05:00
parent 0b8b39f951
commit 207a319349
2 changed files with 39 additions and 5 deletions

View File

@ -93,6 +93,9 @@ PROJECTS_ROOT = os.path.join(BASE_DIR, 'projects')
# directory should not be web-accessible # directory should not be web-accessible
JOBOUTPUT_ROOT = os.path.join(BASE_DIR, 'job_output') JOBOUTPUT_ROOT = os.path.join(BASE_DIR, 'job_output')
# Absolute filesystem path to the directory to store logs
LOG_ROOT = os.path.join(BASE_DIR)
# The heartbeat file for the tower scheduler # The heartbeat file for the tower scheduler
SCHEDULE_METADATA_LOCATION = os.path.join(BASE_DIR, '.tower_cycle') SCHEDULE_METADATA_LOCATION = os.path.join(BASE_DIR, '.tower_cycle')
@ -558,7 +561,7 @@ LOGGING = {
'level': 'WARNING', 'level': 'WARNING',
'class':'logging.handlers.RotatingFileHandler', 'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'], 'filters': ['require_debug_false'],
'filename': os.path.join(BASE_DIR, 'tower_warnings.log'), 'filename': os.path.join(LOG_ROOT, 'tower_warnings.log'),
'maxBytes': 1024*1024*5, # 5 MB 'maxBytes': 1024*1024*5, # 5 MB
'backupCount': 5, 'backupCount': 5,
'formatter':'simple', 'formatter':'simple',
@ -567,7 +570,7 @@ LOGGING = {
'level': 'WARNING', 'level': 'WARNING',
'class':'logging.handlers.RotatingFileHandler', 'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'], 'filters': ['require_debug_false'],
'filename': os.path.join(BASE_DIR, 'callback_receiver.log'), 'filename': os.path.join(LOG_ROOT, 'callback_receiver.log'),
'maxBytes': 1024*1024*5, # 5 MB 'maxBytes': 1024*1024*5, # 5 MB
'backupCount': 5, 'backupCount': 5,
'formatter':'simple', 'formatter':'simple',
@ -576,7 +579,7 @@ LOGGING = {
'level': 'WARNING', 'level': 'WARNING',
'class':'logging.handlers.RotatingFileHandler', 'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'], 'filters': ['require_debug_false'],
'filename': os.path.join(BASE_DIR, 'socketio_service.log'), 'filename': os.path.join(LOG_ROOT, 'socketio_service.log'),
'maxBytes': 1024*1024*5, # 5 MB 'maxBytes': 1024*1024*5, # 5 MB
'backupCount': 5, 'backupCount': 5,
'formatter':'simple', 'formatter':'simple',
@ -585,7 +588,7 @@ LOGGING = {
'level': 'INFO', 'level': 'INFO',
'class':'logging.handlers.RotatingFileHandler', 'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'], 'filters': ['require_debug_false'],
'filename': os.path.join(BASE_DIR, 'task_system.log'), 'filename': os.path.join(LOG_ROOT, 'task_system.log'),
'maxBytes': 1024*1024*5, # 5 MB 'maxBytes': 1024*1024*5, # 5 MB
'backupCount': 5, 'backupCount': 5,
'formatter':'simple', 'formatter':'simple',

View File

@ -44,7 +44,7 @@ JOBOUTPUT_ROOT = '/var/lib/awx/job_status/'
# The heartbeat file for the tower scheduler # The heartbeat file for the tower scheduler
SCHEDULE_METADATA_LOCATION = '/var/lib/awx/.tower_cycle' SCHEDULE_METADATA_LOCATION = '/var/lib/awx/.tower_cycle'
LOGGING['handlers']['rotating_file'] = { LOGGING['handlers']['tower_warnings'] = {
'level': 'WARNING', 'level': 'WARNING',
'class':'logging.handlers.RotatingFileHandler', 'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'], 'filters': ['require_debug_false'],
@ -54,6 +54,37 @@ LOGGING['handlers']['rotating_file'] = {
'formatter':'simple', 'formatter':'simple',
} }
LOGGING['handlers']['callback_receiver'] = {
'level': 'WARNING',
'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'],
'filename': '/var/log/tower/callback_receiver.log',
'maxBytes': 1024*1024*5, # 5 MB
'backupCount': 5,
'formatter':'simple',
}
LOGGING['handlers']['socketio_service'] = {
'level': 'WARNING',
'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'],
'filename': '/var/log/tower/socketio_service.log',
'maxBytes': 1024*1024*5, # 5 MB
'backupCount': 5,
'formatter':'simple',
}
LOGGING['handlers']['task_system'] = {
'level': 'INFO',
'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'],
'filename': '/var/log/tower/task_system.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 # Load settings from any .py files in the global conf.d directory specified in
# the environment, defaulting to /etc/tower/conf.d/. # the environment, defaulting to /etc/tower/conf.d/.
settings_dir = os.environ.get('AWX_SETTINGS_DIR', '/etc/tower/conf.d/') settings_dir = os.environ.get('AWX_SETTINGS_DIR', '/etc/tower/conf.d/')