Merge pull request #134 from open-cloud/debug
Write django and ansible debug logs to disk
diff --git a/xos/configurations/common/xos_common_config b/xos/configurations/common/xos_common_config
index f7b335e..76ba747 100644
--- a/xos/configurations/common/xos_common_config
+++ b/xos/configurations/common/xos_common_config
@@ -37,6 +37,7 @@
images_directory=/opt/xos/images
dependency_graph=/opt/xos/model-deps
logfile=/var/log/xos_backend.log
+save_ansible_output=True
[gui]
disable_minidashboard=True
diff --git a/xos/xos/settings.py b/xos/xos/settings.py
index c8b0b07..8764b80 100644
--- a/xos/xos/settings.py
+++ b/xos/xos/settings.py
@@ -209,13 +209,23 @@
}
},
'handlers': {
+ 'file': {
+ 'level': 'DEBUG',
+ 'class': 'logging.FileHandler',
+ 'filename': '/var/log/django_debug.log',
+ },
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
- }
+ },
},
'loggers': {
+ 'django': {
+ 'handlers': ['file'],
+ 'level': 'DEBUG',
+ 'propagate': True,
+ },
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',