[Zope-Checkins] CVS: Zope/lib/python/OFS - Application.py:1.186

Chris McDonough chrism@zope.com
Fri, 9 Aug 2002 10:51:54 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv22559

Modified Files:
	Application.py 
Log Message:
Create an error_log in the root (unconditionally) at startup.

This is a temporary admission of defeat.  I have a much more elaborate
"default content setup" scheme half-coded, but in case I don't finish
it in time for the release of 2.6, at least folks will have an error_log
(as mentioned in the Zope Book ;-)


=== Zope/lib/python/OFS/Application.py 1.185 => 1.186 ===
--- Zope/lib/python/OFS/Application.py:1.185	Tue Jul  9 11:14:51 2002
+++ Zope/lib/python/OFS/Application.py	Fri Aug  9 10:51:53 2002
@@ -417,6 +417,14 @@
             get_transaction().note('Created initial user')
             get_transaction().commit()
 
+    # Install an error_log
+    if not hasattr(app, 'error_log'):
+        from Products.SiteErrorLog.SiteErrorLog import SiteErrorLog
+        error_log = SiteErrorLog()
+        app._setObject('error_log', error_log)
+        get_transaction().note('Added site error_log at /error_log')
+        get_transaction().commit()
+
     install_products(app)
     install_standards(app)