[Zope] steering Zserver startup messages to syslog?
theotiwii@earthlink.net
theotiwii@earthlink.net
Wed, 19 Sep 2001 12:17:08 -0700
Marc:
> Does anyone know how to send the output of the 'start' script of Zserver to
> syslog?
I'm running RH 7.1 and grabbed the RPM's from:
http://www.taupro.com/Downloads/Zope/Zope241
(..Stay with me on this, you might need it to solve your logging
problems...)
Comments in the startup file (/var/zope/zserver.sh) read (please read,
it's important):
# Now that we have fixed syslog.syslog_client to handle RH 6.1's
changes, we
# can use syslogd for logging. Logging to a remote server using syslogd
can
# be done by using ZSYSLOG_SERVER instead if ZYSLOG. If you do not
define
# either of the ZSYSLOG* env vars, logging goes to the file specified by
# the -l <file> command argument instead.
# Note: For syslog logging to work from the ZServer/medusa subsystem,
the
# ZSYSLOG variable must now contain the name of the socket to log to,
# usually /dev/log on Unix machines. JM 19991104.
export ZSYSLOG="/dev/log"
#export ZSYSLOG_SERVER="localhost:514"
THIS IS MY CONTRIBUTION:
Using ZSYSLOG on my RH system resulted in syslog message(s):
z2[14150]: Startup exception : error: (111, 'Connection refused')
... and ZServer (Zope) failed to start. I traced this down to Medusa
failing to connect to /dev/log, but do not have the expertise to
determine why not (any help out there?).
My resolution was to leave the variable ZSYSLOG _undefined_ and allow
logging to a file, here is the actual startup command:
cd $INSTANCE_HOME
/usr/bin/env python2.1 z2.py \
-u zope \
-z /usr/share/zope \
-Z /var/run/zwatchdog.pid \
-w 8080 \
-f 8021 \
-m '' \
-l /var/log/zope \
>> /var/log/zope 2>&1 \
&
Note: if ZSYSLOG is defined, the "-l" option above is ignored... Also,
add a "-D" to enable debugging if you want more info from startup:
DISCLAIMER: I've been using ZOPE for, er.. since last night :-/ This
message encompasses my entire knowledge base for Zope and is probably
totally incorrect, useless, and likely to break stuff...
-Ron
PS: I'm not impressed with the ease of installation... I guess it's
designed to weed out the unfit.