[Zope-Coders] new zLOG

Chris McDonough chrism@zope.com
26 Nov 2002 11:06:37 -0500


On Tue, 2002-11-26 at 10:37, Guido van Rossum wrote:
> This sounds like a good reason to not introduce two new envvars
> (EVENT_LOG_FILE and EVENT_LOG_SEVERITY) and only support the old ones
> for backwards compatibility (STUPID_LOG_FILE and STUPID_LOG_SEVERITY),
> if (as you say) using the files in a production setting is stupid.

This change was introduced in 2.6, not by my latest checkins.

However, I *was* the guilty party who made the EVENT_LOG_* aliases.  The
change stemmed from the fact that I've needed to tell customers on the
phone "OK Mary, type
dot-slash-start-space-dash-D-space-STUPID-under-LOG-under-FILE-equals-enter" which is pretty embarrassing (it sounds unprofessional) if you've not had to do it yet. ;-)

That said, for nostalgia's sake I should add a "stupid_log_file" key  as
an easter egg to the config file schema. ;-)

> > It needs to be fixed, and, for Zope, it even *has* been fixed on a
> > branch.  I hope to convince folks to see a need for it in ZEO as well.
> 
> The new zdaemon.py script calls setuid() before even forking the
> server subprocess.  Currently it only does this if you explicitly
> specify -u, but it's easy to do change this to call setuid() by
> default when invoked by root.

Looks good.  It looks like you were careful to not write to zLOG in
zdaemon itself until after a setuid (was this intentional)?

I think it's the right thing to *not* have zdaemon perfom setuid by
default if started as root because you may want the child process have
privileges to bind to low ports and whatnot and manage its own setuid.

> OK, I'll check a change to zLOG in soon (without API, let's call it a
> YAGNI).

Thanks.

- C