aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/default_settings.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2013-03-26 18:03:28 +0000
committerMichael Elkins <melkins@tislabs.com>2013-03-26 18:03:28 +0000
commit8f30ccbc7e062811cdd9db8de99bcb7f946253ae (patch)
tree74ba1d285abe5e6beafa901d5d5d7978a2ecddc1 /rpkid/portal-gui/default_settings.py
parent536b2264837212ea79025e65cc723685dfb20810 (diff)
configure logging support to go both to apache.log and to email the admins upon ERROR
put static configuration into ${sysconfdir}/rpki/default_settings.py to avoid issue with %() expansion when settings.py is generated closes #496 svn path=/trunk/; revision=5220
Diffstat (limited to 'rpkid/portal-gui/default_settings.py')
-rw-r--r--rpkid/portal-gui/default_settings.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/rpkid/portal-gui/default_settings.py b/rpkid/portal-gui/default_settings.py
new file mode 100644
index 00000000..bbe1d54f
--- /dev/null
+++ b/rpkid/portal-gui/default_settings.py
@@ -0,0 +1,42 @@
+"""
+This module contains static configuration settings for the web portal.
+"""
+
+__version__ = '$Id$'
+
+# must end with a slash!
+STATIC_URL = '/media/'
+
+# where to email server errors
+ADMINS = (('Administrator', 'root@localhost'),)
+
+LOGGING = {
+ 'version': 1,
+ 'formatters': {
+ 'verbose': {
+ # see http://docs.python.org/2.7/library/logging.html#logging.LogRecord
+ 'format': '%(levelname)s %(asctime)s %(name)s %(message)s'
+ },
+ },
+ 'handlers': {
+ 'stderr': {
+ 'class': 'logging.StreamHandler',
+ 'level': 'DEBUG',
+ 'formatter': 'verbose',
+ },
+ 'mail_admins': {
+ 'level': 'ERROR',
+ 'class': 'django.utils.log.AdminEmailHandler',
+ },
+ },
+ 'loggers': {
+ 'django': {
+ 'level': 'ERROR',
+ 'handlers': ['stderr', 'mail_admins'],
+ },
+ 'rpki.gui': {
+ 'level': 'DEBUG',
+ 'handlers': ['stderr'],
+ },
+ },
+}