Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
5933c548
Commit
5933c548
authored
Jul 21, 2003
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ENVIRONMENT.txt (woo whoo!) and hopelessly out of date LOGGING.txt.
parent
0e815c9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
451 deletions
+0
-451
doc/ENVIRONMENT.txt
doc/ENVIRONMENT.txt
+0
-337
doc/LOGGING.txt
doc/LOGGING.txt
+0
-114
No files found.
doc/ENVIRONMENT.txt
deleted
100644 → 0
View file @
0e815c9c
The following environment variables are used by Zope.
Setting an enviornment variable:
setenv <VARIABLE_NAME> <VALUE> (for csh/tcsh)
export <VARIABLE_NAME>=<VALUE> (for sh/bash)
set <VARIABLE_NAME>=<VALUE> (for Windows)
Example:
setenv INSTANCE_HOME /opt/Zope/instance
export INSTANCE_HOME=/opt/Zope/instance
set INSTANCE_HOME=C:\Zope\instance
Zope installation
INSTANCE_HOME
If an INSTANCE_HOME is defined and has a 'lib/python' sub
directory, it will be added to the front of the Python path.
INSTANCE_HOME is usually used to separate the Zope core
installation from application code and third-party
modules/products.
See also: SOFTWARE_HOME
SOFTWARE_HOME
The SOFTWARE_HOME usually keeps the directory name of the
Zope core installation.
Order of product initialization:
All Products are initialized in ascending alphabetical order by
product name, regardless of whether an INSTANCE_HOME exists.
If two products with the same name exist in both SOFTWARE_HOME
and INSTANCE_HOME, the order in which they appear in
Application.Products.__path__ determines whether they are
loaded first or second.
See also: INSTANCE_HOME
ZOPE_HOME
ZOPE_HOME is the root of the Zope software, where the ZServer
package, z2.py, and the default import directory may be found.
FORCE_PRODUCT_LOAD
This environment variable can be used to force or suppress
Zope's normal automatic (implicit) product installation. If
this variable is set, then persistent objects representing Zope
products are implicitly installed if and only if the environment
variable has a non-empty value.
If this environment variable is not set, then products are
implicitly installed unless the ZEO_CLIENT environment
variable is set to a non-empty value.
Here's a table explaining how FORCE_PRODUCT_LOAD and ZEO_CLIENT
will effect the behavior of product loading:
FORCE_PRODUCT_LOAD ZEO_CLIENT RESULT
unset unset Products are loaded
empty string unset Products are not loaded
nonempty string unset Products are loaded
unset set Products are not loaded
nonempty string set Products are loaded
empty string set Products are not loaded
Profiling
PROFILE_PUBLISHER
If set, Zope is forced profile every request of the ZPublisher.
The profiling information is written to the value of the
PROFILE_PUBLISHER.
SiteAccess
SUPPRESS_ACCESSRULE
If set, all SiteRoots are suppressed (used by SiteAccess products).
SUPPRESS_SITEROOT
If set, all site access rules are suppressed (used by SiteAccess
products).
ZPublisher
ZOPE_TRUSTED_PROXIES
A colon seperated list of IP addresses which run trusted
proxy servers. If a connection comes from an address listed
here, Zope will trust any X-Forwarded-For header to contain
the users real IP address for the purposes of address-based
authentication limits.
ZEO
CLIENT_HOME
CLIENT_HOME allows ZEO clients to easily keep distinct pid and log
files. This is currently an *experimental* feature.
ZEO_CLIENT
If you want a persistent client cache which retains cache contents
across ClientStorage restarts, you need to define the environment
variable, ZEO_CLIENT, to a unique name for the client. This is
needed so that unique cache name files can be computed. Otherwise,
the client cache is stored in temporary files which are removed
when the ClientStorage shuts down.
ZEO_CACHE_TRACE
To enable cache tracing, set this environment variable to the
basename of a file to which the ZEO client process can write.
ZEO will append a hyphen and the storage name to the filename,
to distinguish different storages. If the file doesn't exist,
the ZEO will try to create it. See lib/python/ZEO/README.txt
for more information.
Debugging and Logging
EVENT_LOG_FILE="path" or STUPID_LOG_FILE="path"
The event file logger writes Zope logging information to a file.
It is not very smart about it - it just dumps it to a file and the
format is not very configurable - hence the name STUPID_LOG_FILE.
EVENT_LOG_FILE is the preferred envvar but STUPID_LOG_FILE
also works.
See also: LOGGING.txt
EVENT_LOG_SEVERITY <number> or STUPID_LOG_SEVERITY <number>
If set, Zope logs only messages whose severity is level is
higher than the specified one. EVENT_LOG_SEVERITY is the
preferred envvar but STUPID_LOG_SEVERITY also works.
ZSYSLOG="/dev/log"
Setting this environment variable will cause Zope to try and write
the event log to the named UNIX domain socket (usually '/dev/log').
This will only work on UNIX.
See also: LOGGING.txt
ZSYSLOG_FACILITY="facilityname"
Setting this environment variable will cause Zope to use the syslog
logger with the given facility. This environment variable is
optional and overrides the default facility "user". This will only
work on UNIX.
See also: LOGGING.txt
ZSYSLOG_SERVER="machine.name:port"
Setting this environment variable tells Zope to connect a UDP
socket to machine.name (which can be a name or IP address) and
'port' which must be an integer. The default syslogd port is '514'
but Zope does not pick a sane default, you must specify a port.
This may change, so check back here in future Zope releases.
See also: LOGGING.txt
ZSYSLOG_ACCESS="/dev/log"
ZSYSLOG_ACCESS_FACILITY="facilityname"
ZSYSLOG_ACCESS_SERVER="machine.name:port"
Like ZSYSLOG, ZSYSLOG_FACILITY, and ZSYSLOG_SERVER, but
controlling the sending of access information to syslog
(rather than controlling the sending of the event log)
Z_DEBUG_MODE "yes" or "no"
BOBO_DEBUG_MODE "yes" or "no" (obsolete)
Run Zope in debug mode if set. Same as -D options (z2.py)
Miscellaneous
Z_REALM "your realm"
BOBO_REALM "your realm" (obsolete)
Realm to be used when send HTTP authentication requests to a web
client. The real string is displayed when the web browser pops up
the username/password requester
Security related
NO_SECURITY
Unknown. Used by TAL
ZOPE_SECURITY_POLICY
If this variable is set to "PYTHON", Zope will use the traditional
Python based AccessControl implementation. By default and for
performance reasons Zope will use the cAccessControl module (Zope
2.5+)
ZSP_OWNEROUS_SKIP
If set, will cause the Zope Security Policy to skip checks relating
to ownership, for servers on which ownership is not important.
ZSP_AUTHENTICATED_SKIP
If set, will cause the Zope Security Policy to skip checks relating
to authentication, for servers which serve only anonymous content.
DISALLOW_LOCAL_PRODUCTS
unknown
ZODB related
ZOPE_DATABASE_QUOTA
If this variable is set, it should be set to an integer number of
bytes. Additions to the database are not allowed if the database
size exceeds the quota.
ZOPE_READ_ONLY
If this variable is set, then the database is opened in read only
mode. If this variable is set to a string parsable by
DateTime.DateTime, then the database is opened read-only as of the
time given. Note that changes made by another process after the
database has been opened are not visible.
Session related
ZSESSION_ADD_NOTIFY
An optional full Zope path name of a callable object to be set as
the "script to call on object addition" of the session_data
transient object container created in temp_folder at startup.
ZSESSION_DEL_NOTIFY
An optional full Zope path name of a callable object to be set as
the "script to call on object deletion" of the session_data
transient object container created in temp_folder at startup.
ZSESSION_TIMEOUT_MINS
The number of minutes to be used as the "data object timeout" of the
"/temp_folder/session_data" transient object container.
ZSESSION_OBJECT_LIMIT
The number of items to use as a "maximum number of subobjects"
value of the "/temp_folder" session data transient object container.
WebDAV
WEBDAV_SOURCE_PORT_CLIENTS
Setting this variable enables the retrieval of the document source
through the standard HTTP port instead of the WebDAV port. The value
of this variable is a regular expression that is matched against
the user-agent string of the client.
Example::
WEBDAV_SOURCE_PORT_CLIENTS="cadaver.*" enables retrieval
of the document source for the Cadaver WebDAV client
Structured Text
STX_DEFAULT_LEVEL
Set this variable to change the default level for <Hx> elements.
The default level is 3.
ZOPE_DTML_REQUEST_AUTOQUOTE
Set this variable to one of 'no', '0' or 'disabled' to disable
autoquoting of implicitly retrieved REQUEST data that contain a '<'
when used in a dtml-var construction. When *not* set to one of these
values, all data implicitly taken from the REQUEST (as oposed to
addressing REQUEST.varname directly), that contain a '<', will be
HTML quoted when interpolated with a <dtml-var> or &dtml-;
construct.
reStructuredText
REST_INPUT_ENCODING
Specifies the encoding of the reST document (e.g. 'utf-8',
'iso-8859' or any other valid encoding recognized by Python).
The default is Pythons default encoding.
REST_OUTPUT_ENCODING
Specifies the encoding of rendered reST documents.
The default is Pythons default encoding.
DateTime
DATETIME_FORMAT
Set this variable either to "us" or "international" to force
the DateTime module to parse date strings either with
month before days before year or days before month before
year. If unset the default behaviour of DateTime is untouched
and parses ambigious date formats as US date.
Esoteric
Z_MAX_STACK_SIZE
This variable allows you to customize the size of the Zope stack
used by the SecurityManager (default 100).
FORCE_PRODUCT_RELOAD
unknown (Shane's Refresh product ???)
doc/LOGGING.txt
deleted
100644 → 0
View file @
0e815c9c
Zope Logging
Zope2 now comes with a Logging facility called ZLogger. ZLogger is
an extensible logging system. Currently, ZLogger will log either to a
file or to syslog. (Syslog logging works even on windows, because
it talks directly to the syslog server using UDP, instead of the
POSIX syslog calls).
Logging is controlled by setting environment variables. This is done
most easily by providing the settings on the z2.py command line. For
example::
$ python2.1 z2.py ZSYSLOG_SERVER="syslog.mydomain.com:514" \
EVENT_LOG_FILE="var/Zope.log"
Currently, the following environment variables can be set:
EVENT_LOG_FILE="path"
The event file logger writes Zope logging information to a file.
It is not very smart about it - it just dumps it to a file and the
format is not very configurable - hence the name.
ZSYSLOG="/dev/log"
Setting this environment variable will cause Zope to try and write
to the named UNIX domain socket (usually '/dev/log'). This will only
work on UNIX.
(In versions up to Zope 2.6, this also caused the access log
to be sent to syslog. In version 2.6 this is now controlled
by the separate ZSYSLOG_ACCESS environment variable)
ZSYSLOG_FACILITY="facilityname"
Setting this environment variable will cause Zope to use the
syslog logger with the given facility. This environment variable
is optional and overrides the default facility "user". This will
only work on UNIX.
ZSYSLOG_SERVER="machine.name:port"
Setting this environment variable tells Zope to connect a UDP
socket to machine.name (which can be a name or IP address) and
'port' which must be an integer. The default syslogd port is '514'
but Zope does not pick a sane default, you must specify a port.
This may change, so check back here in future Zope releases.
(In versions up to Zope 2.6, this also caused the access log
to be sent to syslog. In version 2.6 this is now controlled
by the separate ZSYSLOG_ACCESS_SERVER environment variable)
Calling the logger in your code
If you want your own Zope extensions to use logging:
import zLOG
zLOG.LOG(subsystem, severity, summary, detail, error, reraise)
The following arguments are required:
subsystem -- The subsystem generating the message (e.g. ZODB)
severity -- The "severity" of the event. This may be an integer or
a floating point number. Logging back ends may
consider the int() of this value to be significant.
For example, a backend may consider any severity
with integer value of WARNING to be a warning. By
default, the zLOG module defines the following
severities:
BLATHER=-100
INFO=0
PROBLEM=WARNING=100
ERROR=200
PANIC=300
summary -- A short summary of the event.
detail -- A detailed description.
error -- A three-element tuple consisting of an error type, value, and
traceback. If provided, then a summary of the error
is added to the detail.
reraise -- If provided with a true value, then the error given by
error is reraised.
Creating your own Logger
Creating your own Zope logger is easy. Simply define a logger class
with the following interface::
class LumberJack:
""" an ok Logger
I sleep all night, I work all day
"""
def __init__(self):
pass
def __call__(self, sub, sev, sum, det, err):
print ' %s, %s, %s, %s, %s, %s' % (self, sub, sev, sum, det, err)
Then you must edit lib/python/Zope/ZLogger/ZLogger.py and instantiate
one of your Loggers in the 'logger' tuple::
loggers = (stupidFileLogger.stupidFileLogger(),
syslogLogger.syslogLogger(),
LumberJack.LumberJack(),)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment