[Zope] setting Z_DEBUG_MODE

Chris McDonough chrism at plope.com
Tue Feb 24 13:34:53 EST 2004


Z_DEBUG_MODE likely has no effect any more (or at least it's
indeterminate whether it does or not).  All Zope 2.7 configuration is
done via the instance's zope.conf file.  You should edit that file and
change a key.  The key you're looking for is "debug-mode" and it should
be set to "on".  But if you've not changed anything in that file, it is
set to "on" by default, so that's probably not your problem.

Lots has happened to the way Zope reports errors since the Zope Bible
print edition was published (likely... 2 or more years ago?).  Long ago,
Zope used to put traceback information in the error page itself, but
this was deemed to be inappropriate due to security and other concerns.

There is now an error_log object in the Zope root directory which has
responsibility for keeping track of traceback reporting.  By default,
this object is configured to allow you to view traceback information by
visiting its Zope management interface tab.  It can optionally send
output to the Zope event log file (see the option for "copy errors to
event log" in the error_log management interface).

This isn't very convenient, lots of the time, because you need to click
around in the ZMI to see where the error was.  What I do is tell the
error_log to copy tracebacks to the event log, then I'll configure Zope
to send the error log to stdout, by editing the <eventlog> section in my
zope.conf file to look like this:

<eventlog>
  level all
  <logfile>
    path $INSTANCE/var/event.log
    level info
  </logfile>
  <logfile>
    path STDOUT
    level info
  </logfile>
</eventlog>

This tells Zope to send the event log both to the event.log file and to
stdout.  Then I start zope via runzope without backgrounding it. 
Whenver there's an error, the traceback gets sent to the console on
which I started runzope.

HTH,

- C


On Tue, 2004-02-24 at 13:47, Jim Anderson wrote:
> I'm a newbie running Zope 2.7.0 on Linux.
> 
> I have some DTML problems and I'd like to get traceback
> information on. Using tcsh, I ran
>     setenv Z_DEBUG_MODE 1
> and then ran 'runzope' in the same window after verifying
> that Z_DEBUG_MODE is indeed set to 1.
> 
> When I run my sample code, I get an error message
> in Zope that is shown at the end of this message.
> With Z_DEBUG_MODE set, I was expecting to
> get a traceback in the error message.  My expectation
> was set from the chapter on debugging in the
> "Zope Bible".
> 
> Questions:
> 
> 1) Did I understance the Zope Bible correctly, i.e.
> the message below should have a traceback in it?
> 
> 2) Did I do something wrong when setting up
> the environment?
> 
> 3) The error message refers to an error log. I checked
> the log subdirectory in the directory where my zope instance
> appears and could not find meaningful information about this
> error there. Is there somewhere else to look?
> 
> 4) If I misunderstood, how can I see a traceback?
> 
> 
> Thanks in advance for any help.
> 
> Jim
> 
> 
> 
> 
> 
> 
> 
> _____________________________Error Message Starts 
> Here________________________________________________
> 
> 
>     Site Error
> 
> An error was encountered while publishing this resource.
> 
> *Error Type: AttributeError*
> *Error Value: Entries*
> 
> ------------------------------------------------------------------------
> 
> Troubleshooting Suggestions
> 
>     * The URL may be incorrect.
>     * The parameters passed to this resource may be incorrect.
>     * A resource that this resource relies on may be encountering an error.
> 
> For more detailed information about the error, please refer to the error 
> log.
> 
> If the error persists please contact the site maintainer. Thank you for 
> your patience.
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at 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 )




More information about the Zope mailing list