Re: [Zope] Reconnection session_data to own Session.fs storage
> I verified using your process that it is indeed just a folder. So I deleted > the session_folder in the root and then tried to add a ZODB mount point in the > root and it showed the session_folder was ready to be created. I made sure > that option was checked and clicked Ok. It reloaded the root folder and the > new session_folder was there, but it still seems like it is just a regular > folder and does not identify itself as a mount point. I also added the > session_data object into that folder as a Transient Object Container as it was > before. > Does the session_data_manager that points to that session_data folder also > have to be removed in this process? Could be holding it up somehow? No. The "session_data" manager contains only the path to the session data. It has nothing to do where the sessions are maintained. You are sure that you have verified via "app.__dict__['temp_folder']" that "temp_folder" is a MountPoint (and have seen it as a normal "Folder")? If you access "temp_folder" normally, it will always look like a normal folder (if mounting was successful). If you have verified correctly, then some magic must have changed your mount point back again to a normal "Folder". I do not know such magic -- therefore, I doubt that your verification was correct. But, you may put your session storage at a different place (say "session_storage") and reconfigure the "session_data_manager" to point to this new place. This way, no magic should be able to modify your mount point. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Getting Zope code to output to event.log
+---[ Ken Winter ]-- | | > -Original Message- | > From: Andrew Milton [mailto:a...@theinternet.com.au] | > Sent: Wednesday, August 05, 2009 3:49 PM | > To: Ken Winter | > Cc: 'Zope List' | > Subject: Re: [Zope] Getting Zope code to output to event.log | > | > +---[ Ken Winter ]-- | > | | > | I figure these modules have to be reinstalled or re-somethinged to get | > my | > | changes activated, but I don?t know how to do this. Can you help? | > | > [this assumes the code is actually being called] | > | > You are probably logging at a level below the level that will be output | > into the log. | > | > LOG.info() is about the lowest level that will go out by default. | > | > Without seeing any examples from you it's hard to tell. | | Here's an example of the traceback from the error I'm trying to debug. I | assume the fact that a module appears in the traceback proves that it is | being called. And you have your logging level set to what? Look in your zope.conf for it should be similar to; level INFO path $INSTANCE/log/event.log You can also try changing logger.info to logger.warn or logger.error -- Andrew Milton a...@theinternet.com.au ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Getting Zope code to output to event.log
> -Original Message- > From: Andrew Milton [mailto:a...@theinternet.com.au] > Sent: Wednesday, August 05, 2009 3:49 PM > To: Ken Winter > Cc: 'Zope List' > Subject: Re: [Zope] Getting Zope code to output to event.log > > +---[ Ken Winter ]-- > | To debug my code in my Zope/Plone site, I sometimes need to put logger > lines > | into Zope/Plone code, in order to trace my way through an error > traceback. > | > | > | > | I can do this easily with Plone code in the Plone Products folder: Just > put in > | the logger line, restart Zope, run my tests, and the output appears in > the Zope > | event.log. But when I try the same thing with native Zope code (for > example, > | in the OFS directory), the output doesn?t show up in event.log. > | > | > | > | I figure these modules have to be reinstalled or re-somethinged to get > my > | changes activated, but I don?t know how to do this. Can you help? > > [this assumes the code is actually being called] > > You are probably logging at a level below the level that will be output > into the log. > > LOG.info() is about the lowest level that will go out by default. > > Without seeing any examples from you it's hard to tell. Here's an example of the traceback from the error I'm trying to debug. I assume the fact that a module appears in the traceback proves that it is being called. 2009-08-05T15:11:20 ERROR Zope.SiteErrorLog http://instance3.dhat.webfactional.com/groups/Popper Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Shared.DC.Scripts.Bindings, line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.PythonScripts.PythonScript, line 326, in _exec Module None, line 19, in Popper - - Line 19 Module Products.Groups.standard_tree, line 131, in populateStandardTrees Module Products.Groups.standard_tree, line 189, in populateStandardTree Module Products.CMFCore.PortalFolder, line 414, in invokeFactory Module Products.CMFCore.TypesTool, line 937, in constructContent Module Products.CMFCore.TypesTool, line 345, in constructInstance Module Products.CMFCore.TypesTool, line 359, in _finishConstruction Module Products.CMFCore.CMFCatalogAware, line 145, in notifyWorkflowCreated Module Products.CMFCore.WorkflowTool, line 409, in notifyCreated Module Products.CMFCore.WorkflowTool, line 760, in _reindexWorkflowVariables Module Products.Archetypes.CatalogMultiplex, line 108, in reindexObjectSecurity Module Products.ZCatalog.CatalogBrains, line 52, in _unrestrictedGetObject Module OFS.Traversable, line 187, in unrestrictedTraverse - __traceback_info__: (['event', 'base-events'], 'practical-matters') Module Products.Five.traversable, line 143, in __bobo_traverse__ AttributeError: practical-matters Here's a snippet from the unrestrictedTraverse() method of instance3/Zope-2.9.8-final/lib/python/OFS/Traversable.py: ... try: obj = self while path: name = path_pop() logger.info("unrestrictedTraverse(): " "\n\t path = %r\n\t name = %r" % (path, name)) __traceback_info__ = path, name if name[0] == '_': # Never allowed in a URL. raise NotFound, name if name == '..': next = aq_parent(obj) if next is not _none: if restricted and not securityManager.validate( obj, obj,name, next): raise Unauthorized, name obj = next continue bobo_traverse = _getattr(obj, '__bobo_traverse__', _none) logger.info("unrestrictedTraverse(): before bobo_traverse") if bobo_traverse is not _none: ... The only thing I've changed in this snippet is to add the two logger lines. I also had to add these lines at the top of the Traversable.py module: import logging logger = logging.getLogger('OFS/Traversable.py:') ~ HTH ~ Ken ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Getting Zope code to output to event.log
+---[ Ken Winter ]-- | To debug my code in my Zope/Plone site, I sometimes need to put logger lines | into Zope/Plone code, in order to trace my way through an error traceback. | | | | I can do this easily with Plone code in the Plone Products folder: Just put in | the logger line, restart Zope, run my tests, and the output appears in the Zope | event.log. But when I try the same thing with native Zope code (for example, | in the OFS directory), the output doesn?t show up in event.log. | | | | I figure these modules have to be reinstalled or re-somethinged to get my | changes activated, but I don?t know how to do this. Can you help? [this assumes the code is actually being called] You are probably logging at a level below the level that will be output into the log. LOG.info() is about the lowest level that will go out by default. Without seeing any examples from you it's hard to tell. -- Andrew Milton a...@theinternet.com.au ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Getting Zope code to output to event.log
To debug my code in my Zope/Plone site, I sometimes need to put logger lines into Zope/Plone code, in order to trace my way through an error traceback. I can do this easily with Plone code in the Plone Products folder: Just put in the logger line, restart Zope, run my tests, and the output appears in the Zope event.log. But when I try the same thing with native Zope code (for example, in the OFS directory), the output doesn't show up in event.log. I figure these modules have to be reinstalled or re-somethinged to get my changes activated, but I don't know how to do this. Can you help? ~ TIA ~ Ken ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Reconnection session_data to own Session.fs storage
Dieter Maurer wrote: Allen Schmidt Sr. wrote at 2009-8-4 13:45 -0400: ... In the ZMI, there are: /session_folder/ ( a regular folder ) session_data ( Transient Object Container ) /session_data_manager ( Session Data Manager ) All the parts seem right but its not workingsession writes wind up as anonymous transactions in the main ZODB. Any ideas? Verify that "session_folder" is a mount point and not a regular folder. This is not trivial as a mount point, once mounted, tries hard to become the mounted object (this happens in its "__of__" method). You must avoid acquisition to check that it is indeed a mount point. One way is to use "app._p_activate(); app.__dict__['session_folder']". This must return a mount point, not a folder. I verified using your process that it is indeed just a folder. So I deleted the session_folder in the root and then tried to add a ZODB mount point in the root and it showed the session_folder was ready to be created. I made sure that option was checked and clicked Ok. It reloaded the root folder and the new session_folder was there, but it still seems like it is just a regular folder and does not identify itself as a mount point. I also added the session_data object into that folder as a Transient Object Container as it was before. Does the session_data_manager that points to that session_data folder also have to be removed in this process? Could be holding it up somehow? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )