diff gpp/settings.py @ 38:c14cfd6be87a

Added basic logging to settings.py. The send_email function is now logging. Removed remnants of the DebugLog model.
author Brian Neal <bgneal@gmail.com>
date Thu, 11 Jun 2009 01:33:38 +0000
parents 296b610ee507
children f21771118fb2
line wrap: on
line diff
--- a/gpp/settings.py	Thu Jun 11 01:00:31 2009 +0000
+++ b/gpp/settings.py	Thu Jun 11 01:33:38 2009 +0000
@@ -2,8 +2,10 @@
 
 import os
 import platform
+from decimal import Decimal
+import logging
+
 import local_settings
-from decimal import Decimal
 
 project_path = os.path.abspath(os.path.split(__file__)[0])
 
@@ -157,6 +159,18 @@
 DONATIONS_ITEM_NUM = 500            # donation w/name listed
 DONATIONS_ITEM_ANON_NUM = 501       # donation listed as anonymous
 
+#######################################################################
+# Configure Logging
+#######################################################################
+
+logging.basicConfig(
+        filename=os.path.join(project_path, 'logs', 'gpp.log'),
+        filemode='a',
+        format='%(asctime)s %(levelname)s %(message)s',
+        level=local_settings.LOG_LEVEL)
+
+
+#######################################################################
 # URL's of 3rd party Javascript and CSS files.
 # These dictionaries are used by core/templatetags/script_tags, and
 # should also be used by developers when creating form media classes.