Esempio n. 1
0
def install_errorlog(self):
    app = self.getApp()
    if app._getInitializerFlag('error_log'):
        # do nothing if we've already installed one
        return
    # 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)
        # Added for Five 1.2:
        error_log = app.error_log
        error_log.manage_afterAdd(error_log, app)
        # End added
        app._setInitializerFlag('error_log')
        self.commit('Added site error_log at /error_log')
Esempio n. 2
0
def install_errorlog(self):
    app = self.getApp()
    if app._getInitializerFlag('error_log'):
        # do nothing if we've already installed one
        return
    # 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)
        # Added for Five 1.2:
        error_log = app.error_log
        error_log.manage_afterAdd(error_log, app)
        # End added
        app._setInitializerFlag('error_log')
        self.commit('Added site error_log at /error_log')
Esempio n. 3
0
    def install_errorlog(self):
        app = self.getApp()
        if app._getInitializerFlag('error_log'):
            # do nothing if we've already installed one
            return

        # 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)
            # FIXME explicitely call manage_afterAdd, as sometimes
            # events are initialized too late
            error_log = app.error_log
            error_log.manage_afterAdd(error_log, app)
            app._setInitializerFlag('error_log')
            self.commit('Added site error_log at /error_log')
Esempio n. 4
0
    def install_errorlog(self):
        app = self.getApp()
        if app._getInitializerFlag('error_log'):
            # do nothing if we've already installed one
            return

        # 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)
            # FIXME explicitely call manage_afterAdd, as sometimes
            # events are initialized too late
            error_log = app.error_log
            error_log.manage_afterAdd(error_log, app)
            app._setInitializerFlag('error_log')
            self.commit('Added site error_log at /error_log')