[Zope] Re: export Z_DEBUG_MODE=no -- broken?

Martijn Pieters mj@digicool.com
Sat, 26 Feb 2000 08:16:25 -0500


From: Martijn Pieters [mailto:mj@digicool.com]
> Indeed, this is caused by the fact you closed STDOUT and STDERR on the
> process.
> 
> In stead of the -D, you can start Zope up with 
> 
>   z2.py [options] Z_DEBUG_MODE=1
> 
> where [options] is your current list of options used minus 
> the -D flag.
> Zope then will behave demonic again (run nohup) and you'll 
> only miss out
> on extra log messages from ZServer.

Harumph. I should've checked better before sending. ZDaemon will _not_
fork when it encounters the Z_DEBUG_MODE flag set.

However, setting the BOBO_DEBUG_MODE flag to 1 will work. Internally,
BOBO_DEBUG_MODE is the old name for Z_DEBUG_MODE, and it still works as
well. However, the newer fork and watchdog daemon will not look for it.
Also, the log will not be echoed to STDERR (which it would in all cases
with Z_DEBUG_MODE set).

Side effects of setting the (BOBO|Z)_DEBUG_MODE flag (that I could
find):

- When trying to access methods starting with an _ (underscore) or that
have no docstring, a more descriptive error message instead of Not Found
is returned.
- All other Not Found errors are replaced with a debug error with the
message "Cannot locate object at: [URL]"
- Tracebacks in error messages will be wrapped in <PRE></PRE>, not <!--
-->
- The Unauthorized error will include information on whether the
supplied credentials where incorrect or that there were no credentials
supplied.
- HTMLFile objects (used in Python products) includes the filename from
which they were sourced
- HTMLFile objects, when called, reload from their sourcefile if the
sourcefile has changed since the last call.
 

> 
> You might want to add STUPID_LOG_FILE=[path to log] as well, so that
> logging messages (like that of the GUF) will be sent to the proper log
> file.
 
Note, as said above, if Z_DEBUG_MODE is set, no forking will take place,
and log messages will always be echoed to STDERR, even if
STUPID_LOG_FILE is set to a filename.

-- 
Martijn Pieters, Software Engineer 
| Digital Creations http://www.digicool.com 
| Creators of Zope      http://www.zope.org 
| mailto:mj@digicool.com       ICQ: 4532236
| PGP:
http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 
-------------------------------------------