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
f2335ce3
Commit
f2335ce3
authored
Jun 22, 1999
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a -l option to z2.py which allows you to set the location and name of the ZServer log.
parent
c3bab08b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
z2.py
z2.py
+18
-4
No files found.
z2.py
View file @
f2335ce3
...
...
@@ -165,6 +165,12 @@ Options:
Use ZODB 2 (aka BoboPOS) rather than ZODB 3
-l path
Path to the ZServer log file. If this is a relative path then the
log file will be written to the 'var' directory. The default is
%(LOG_FILE)s.
Environment settings are of the form: NAME=VALUE.
Note: you *must* use Python 1.5.2 or later!
...
...
@@ -198,13 +204,16 @@ DNS_IP=''
# ZServer is started by root.
UID
=
'nobody'
# Log file location. If this is a relative path, then it is joined the
# the 'var' directory.
LOG_FILE
=
'Z2.log'
## HTTP configuration
##
# Port for HTTP Server. The standard port for HTTP services is 80.
HTTP_PORT
=
9673
# HTTP enivornment settings.
HTTP_ENV
=
{}
...
...
@@ -238,7 +247,7 @@ try:
if
string
.
split
(
sys
.
version
)[
0
]
<
'1.5.2'
:
raise
'Invalid python version'
,
string
.
split
(
sys
.
version
)[
0
]
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hz:Z:t:a:d:u:w:f:p:m:2D'
)
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hz:Z:t:a:d:u:w:f:p:m:
l:
2D'
)
# Get environment variables
for
a
in
args
:
...
...
@@ -289,6 +298,8 @@ try:
print
__doc__
%
vars
()
sys
.
exit
(
0
)
elif
o
==
'-2'
:
MODULE
=
'Main'
elif
o
==
'-l'
:
LOG_FILE
=
v
except
SystemExit
:
sys
.
exit
(
0
)
except
:
...
...
@@ -321,7 +332,10 @@ exec "import "+MODULE in {}
# Location of the ZServer log file. This file logs all ZServer activity.
# You may wish to create different logs for different servers. See
# medusa/logger.py for more information.
LOG_FILE
=
os
.
path
.
join
(
INSTANCE_HOME
,
'var'
,
'Z2.log'
)
if
not
os
.
path
.
isabs
(
LOG_FILE
):
LOG_PATH
=
os
.
path
.
join
(
INSTANCE_HOME
,
'var'
,
LOG_FILE
)
else
:
LOG_PATH
=
LOG_FILE
# Location of the ZServer pid file. When ZServer starts up it will write
# its PID to this file.
...
...
@@ -347,7 +361,7 @@ if DNS_IP:
rs
=
resolver
.
caching_resolver
(
DNS_IP
)
else
:
rs
=
None
lg
=
logger
.
file_logger
(
LOG_
FILE
)
lg
=
logger
.
file_logger
(
LOG_
PATH
)
# HTTP Server
if
HTTP_PORT
:
...
...
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