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
564f8f8d
Commit
564f8f8d
authored
Oct 02, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge changes from Zope-2_7-branch to the trunk.
parent
78326867
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
80 additions
and
75 deletions
+80
-75
doc/ZEO/howto.txt
doc/ZEO/howto.txt
+3
-18
doc/ZEO/trace.txt
doc/ZEO/trace.txt
+2
-2
lib/Components/ExtensionClass/setup.py
lib/Components/ExtensionClass/setup.py
+1
-1
lib/Components/ExtensionClass/src/ExtensionClass.c
lib/Components/ExtensionClass/src/ExtensionClass.c
+1
-1
lib/python/BDBStorage/BDBFullStorage.py
lib/python/BDBStorage/BDBFullStorage.py
+1
-1
lib/python/BDBStorage/BDBMinimalStorage.py
lib/python/BDBStorage/BDBMinimalStorage.py
+3
-2
lib/python/BDBStorage/BerkeleyBase.py
lib/python/BDBStorage/BerkeleyBase.py
+4
-1
lib/python/BDBStorage/tests/ZODBTestBase.py
lib/python/BDBStorage/tests/ZODBTestBase.py
+2
-2
lib/python/BDBStorage/tests/__init__.py
lib/python/BDBStorage/tests/__init__.py
+2
-2
lib/python/BDBStorage/tests/test_virgin.py
lib/python/BDBStorage/tests/test_virgin.py
+3
-3
lib/python/BDBStorage/tests/test_zodb_simple.py
lib/python/BDBStorage/tests/test_zodb_simple.py
+2
-2
lib/python/BDBStorage/tests/testall.py
lib/python/BDBStorage/tests/testall.py
+2
-2
lib/python/BDBStorage/tests/timeiter.py
lib/python/BDBStorage/tests/timeiter.py
+9
-9
lib/python/BDBStorage/tests/timepickles.py
lib/python/BDBStorage/tests/timepickles.py
+14
-14
lib/python/zLOG/BaseLogger.py
lib/python/zLOG/BaseLogger.py
+0
-1
lib/python/zLOG/LogHandlers.py
lib/python/zLOG/LogHandlers.py
+0
-5
lib/python/zLOG/tests/testzLog.py
lib/python/zLOG/tests/testzLog.py
+31
-9
No files found.
doc/ZEO/howto.txt
View file @
564f8f8d
...
@@ -207,13 +207,6 @@ then this command will install the new ZEO and ZODB:
...
@@ -207,13 +207,6 @@ then this command will install the new ZEO and ZODB:
The install command should create a /home/zope/lib/python/ZEO directoy.
The install command should create a /home/zope/lib/python/ZEO directoy.
Simple configuration
--------------------
mkzeoinst.py
Or, do it step-by-step.
Configuring server
Configuring server
------------------
------------------
...
@@ -407,13 +400,9 @@ Running the ZEO server as a daemon
...
@@ -407,13 +400,9 @@ Running the ZEO server as a daemon
In an operational setting, you will want to run the ZEO server a
In an operational setting, you will want to run the ZEO server a
daemon process that is restarted when it dies. The zdaemon package
daemon process that is restarted when it dies. The zdaemon package
provides two tools for running daemons: zdrun.py and zdctl.py.
provides two tools for running daemons: zdrun.py and zdctl.py. The
The document "Using zdctl and zdrun to manage server processes"
document "Using zdctl and zdrun to manage server processes"
explains how to use these scripts to manage daemons.
(Doc/zdctl.txt) explains how to use these scripts to manage daemons.
XXX example of how to use zdrun
XXX mkzeoinst.py docs should probably go here
Rotating log files
Rotating log files
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
...
@@ -437,10 +426,6 @@ manages a ZEO servers password database.
...
@@ -437,10 +426,6 @@ manages a ZEO servers password database.
Diagnosing problems
Diagnosing problems
-------------------
-------------------
How to use the debug logs.
Common gotchas.
If an exception occurs on the server, the server will log a traceback
If an exception occurs on the server, the server will log a traceback
and send an exception to the client. The traceback on the client will
and send an exception to the client. The traceback on the client will
show a ZEO protocol library as the source of the error. If you need
show a ZEO protocol library as the source of the error. If you need
...
...
doc/ZEO/trace.txt
View file @
564f8f8d
Client Cache Tracing
ZEO
Client Cache Tracing
====================
====================
====
An important question for ZEO users is: how large should the ZEO
An important question for ZEO users is: how large should the ZEO
client cache be? ZEO 2 (as of ZEO 2.0b2) has a new feature that lets
client cache be? ZEO 2 (as of ZEO 2.0b2) has a new feature that lets
...
...
lib/Components/ExtensionClass/setup.py
View file @
564f8f8d
lib/Components/ExtensionClass/src/ExtensionClass.c
View file @
564f8f8d
...
@@ -21,7 +21,7 @@ static char ExtensionClass_module_documentation[] =
...
@@ -21,7 +21,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,
\n
"
" - They provide access to unbound methods,
\n
"
" - They can be called to create instances.
\n
"
" - They can be called to create instances.
\n
"
"
\n
"
"
\n
"
"$Id: ExtensionClass.c,v 1.6
1 2003/09/15 16:29:20
jeremy Exp $
\n
"
"$Id: ExtensionClass.c,v 1.6
2 2003/10/02 18:17:27
jeremy Exp $
\n
"
;
;
#include "ExtensionClass.h"
#include "ExtensionClass.h"
...
...
lib/python/BDBStorage/BDBFullStorage.py
View file @
564f8f8d
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
"""Berkeley storage with full undo and versioning support.
"""Berkeley storage with full undo and versioning support.
$Revision: 1.7
3
$
$Revision: 1.7
4
$
"""
"""
import
time
import
time
...
...
lib/python/BDBStorage/BDBMinimalStorage.py
View file @
564f8f8d
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"""Berkeley storage without undo or versioning.
"""Berkeley storage without undo or versioning.
"""
"""
__version__
=
'$Revision: 1.3
1
$'
[
-
2
:][
0
]
__version__
=
'$Revision: 1.3
2
$'
[
-
2
:][
0
]
from
ZODB
import
POSException
from
ZODB
import
POSException
from
ZODB.utils
import
p64
,
U64
from
ZODB.utils
import
p64
,
U64
...
@@ -125,7 +125,8 @@ class BDBMinimalStorage(BerkeleyBase, ConflictResolvingStorage):
...
@@ -125,7 +125,8 @@ class BDBMinimalStorage(BerkeleyBase, ConflictResolvingStorage):
if
version
is
None
:
if
version
is
None
:
self
.
_info
.
put
(
'version'
,
BDBMINIMAL_SCHEMA_VERSION
,
txn
=
txn
)
self
.
_info
.
put
(
'version'
,
BDBMINIMAL_SCHEMA_VERSION
,
txn
=
txn
)
elif
version
<>
BDBMINIMAL_SCHEMA_VERSION
:
elif
version
<>
BDBMINIMAL_SCHEMA_VERSION
:
raise
POSException
.
StorageSystemError
,
'incompatible storage version'
raise
POSException
.
StorageSystemError
(
'incompatible storage version'
)
def
_make_autopacker
(
self
,
event
):
def
_make_autopacker
(
self
,
event
):
return
_Autopack
(
self
,
event
,
self
.
_config
.
frequency
)
return
_Autopack
(
self
,
event
,
self
.
_config
.
frequency
)
...
...
lib/python/BDBStorage/BerkeleyBase.py
View file @
564f8f8d
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
"""
"""
import
os
import
os
import
sys
import
time
import
time
import
errno
import
errno
import
shutil
import
shutil
...
@@ -448,7 +449,9 @@ class BerkeleyBase(BaseStorage):
...
@@ -448,7 +449,9 @@ class BerkeleyBase(BaseStorage):
# i.e. abort the transaction -- but swallow the exception.
# i.e. abort the transaction -- but swallow the exception.
txn
.
abort
()
txn
.
abort
()
except
:
except
:
#import traceback ; traceback.print_exc()
## import traceback ; traceback.print_exc()
zLOG
.
LOG
(
self
.
__class__
.
__name__
,
zLOG
.
DEBUG
,
"unexpected error in _withtxn"
,
error
=
sys
.
exc_info
())
txn
.
abort
()
txn
.
abort
()
raise
raise
else
:
else
:
...
...
lib/python/BDBStorage/tests/ZODBTestBase.py
View file @
564f8f8d
lib/python/BDBStorage/tests/__init__.py
View file @
564f8f8d
lib/python/BDBStorage/tests/test_virgin.py
View file @
564f8f8d
lib/python/BDBStorage/tests/test_zodb_simple.py
View file @
564f8f8d
lib/python/BDBStorage/tests/testall.py
View file @
564f8f8d
lib/python/BDBStorage/tests/timeiter.py
View file @
564f8f8d
lib/python/BDBStorage/tests/timepickles.py
View file @
564f8f8d
lib/python/zLOG/BaseLogger.py
View file @
564f8f8d
...
@@ -21,4 +21,3 @@ class BaseLogger:
...
@@ -21,4 +21,3 @@ class BaseLogger:
for
handler
in
self
.
logger
.
handlers
:
for
handler
in
self
.
logger
.
handlers
:
if
hasattr
(
handler
,
'reopen'
)
and
callable
(
handler
.
reopen
):
if
hasattr
(
handler
,
'reopen'
)
and
callable
(
handler
.
reopen
):
handler
.
reopen
()
handler
.
reopen
()
lib/python/zLOG/LogHandlers.py
View file @
564f8f8d
...
@@ -75,8 +75,3 @@ class StartupHandler(Handler):
...
@@ -75,8 +75,3 @@ class StartupHandler(Handler):
for
record
in
self
.
buffer
:
for
record
in
self
.
buffer
:
target
.
handle
(
record
)
target
.
handle
(
record
)
self
.
buffer
=
[]
self
.
buffer
=
[]
lib/python/zLOG/tests/testzLog.py
View file @
564f8f8d
...
@@ -17,6 +17,7 @@ import sys
...
@@ -17,6 +17,7 @@ import sys
import
tempfile
import
tempfile
import
unittest
import
unittest
import
zLOG
import
zLOG
import
logging
severity_string
=
{
severity_string
=
{
-
300
:
'TRACE'
,
-
300
:
'TRACE'
,
...
@@ -50,13 +51,24 @@ class StupidLogTest(unittest.TestCase):
...
@@ -50,13 +51,24 @@ class StupidLogTest(unittest.TestCase):
self
.
wipeEnvironment
()
self
.
wipeEnvironment
()
self
.
path
=
tempfile
.
mktemp
()
self
.
path
=
tempfile
.
mktemp
()
self
.
_severity
=
0
self
.
_severity
=
0
# Windows cannot remove a file that's open. The logging code
# keeps the log file open, and I can't find an advertised API
# to tell the logger to close a log file. So here we cheat:
# tearDown() will close and remove all the handlers that pop
# into existence after setUp() runs. This breaks into internals,
# but I couldn't find a sane way to do it.
self
.
handlers
=
logging
.
_handlers
.
keys
()
# capture current handlers
def
tearDown
(
self
):
def
tearDown
(
self
):
try
:
# Close and remove all the handlers that came into existence
# since setUp ran.
for
h
in
logging
.
_handlers
.
keys
():
if
h
not
in
self
.
handlers
:
h
.
close
()
del
logging
.
_handlers
[
h
]
os
.
remove
(
self
.
path
)
os
.
remove
(
self
.
path
)
except
os
.
error
:
pass
self
.
wipeEnvironment
()
self
.
wipeEnvironment
()
zLOG
.
initialize
()
def
setLog
(
self
,
severity
=
0
):
def
setLog
(
self
,
severity
=
0
):
os
.
environ
[
'%s_LOG_FILE'
%
self
.
prefix
]
=
self
.
path
os
.
environ
[
'%s_LOG_FILE'
%
self
.
prefix
]
=
self
.
path
...
@@ -111,14 +123,20 @@ class StupidLogTest(unittest.TestCase):
...
@@ -111,14 +123,20 @@ class StupidLogTest(unittest.TestCase):
self
.
setLog
()
self
.
setLog
()
zLOG
.
LOG
(
"basic"
,
zLOG
.
INFO
,
"summary"
)
zLOG
.
LOG
(
"basic"
,
zLOG
.
INFO
,
"summary"
)
f
=
self
.
getLogFile
()
f
=
self
.
getLogFile
()
try
:
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
summary
=
"summary"
)
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
summary
=
"summary"
)
finally
:
f
.
close
()
def
checkDetail
(
self
):
def
checkDetail
(
self
):
self
.
setLog
()
self
.
setLog
()
zLOG
.
LOG
(
"basic"
,
zLOG
.
INFO
,
"xxx"
,
"this is a detail"
)
zLOG
.
LOG
(
"basic"
,
zLOG
.
INFO
,
"xxx"
,
"this is a detail"
)
f
=
self
.
getLogFile
()
f
=
self
.
getLogFile
()
try
:
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
detail
=
"detail"
)
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
detail
=
"detail"
)
finally
:
f
.
close
()
def
checkError
(
self
):
def
checkError
(
self
):
self
.
setLog
()
self
.
setLog
()
...
@@ -131,9 +149,13 @@ class StupidLogTest(unittest.TestCase):
...
@@ -131,9 +149,13 @@ class StupidLogTest(unittest.TestCase):
zLOG
.
LOG
(
"basic"
,
zLOG
.
ERROR
,
"raised exception"
,
error
=
err
)
zLOG
.
LOG
(
"basic"
,
zLOG
.
ERROR
,
"raised exception"
,
error
=
err
)
f
=
self
.
getLogFile
()
f
=
self
.
getLogFile
()
try
:
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
summary
=
"summary"
)
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
summary
=
"summary"
)
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
severity
=
zLOG
.
ERROR
,
self
.
verifyEntry
(
f
,
subsys
=
"basic"
,
severity
=
zLOG
.
ERROR
,
error
=
err
)
error
=
err
)
finally
:
f
.
close
()
class
EventLogTest
(
StupidLogTest
):
class
EventLogTest
(
StupidLogTest
):
""" Test alternate envvars EVENT_LOG_FILE and EVENT_LOG_SEVERITY """
""" Test alternate envvars EVENT_LOG_FILE and EVENT_LOG_SEVERITY """
...
...
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