[Grok-dev] what do people do to get tracebacks with Grok 1.2 and ajax?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Fri Dec 17 06:43:25 EST 2010


On 12/16/10 17:01 PM, Jan-Wijbrand Kolman wrote:
> Hmm, one might be able to get this setting back to True by way of the
> ../bin/interactive_debugger command. Let me try to find out how and
> report back on this.

People who want to re-enable logging Right Now, could use this script::

from zope.component import getSiteManager

   def fix_copy_to_zlog(root):
       sm = getSiteManager(root)
       default = sm['default'] # default site manager folder.
       error_utility = default['RootErrorReportingUtility']
       if error_utility.copy_to_zlog:
           print 'Copy_to_zlog already True!'
           return
       print 'Set copy_to_zlog to True'
       error_utility.copy_to_zlog = True

   if __name__ == '__main__':
       fix_copy_to_zlog(root)
       import transaction
       transaction.commit()

and run the script with the "interactive debugger" like so:

   $ ./bin/interactive_debugger ./path_to_script.py


PLEASE MAKE A BACKUP COPY OF YOU DATABASE BEFORE YOU DO THINGS LIKE THIS 
TO YOU DATABASE.

regards, jw



More information about the Grok-dev mailing list