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
eb4a6d76
Commit
eb4a6d76
authored
Dec 16, 2005
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made sure logging is configured. Read $INSTANCE_HOME/log.ini if it exists.
parent
fdd99eb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
lib/python/Testing/ZopeTestCase/ZopeLite.py
lib/python/Testing/ZopeTestCase/ZopeLite.py
+3
-2
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
+1
-0
lib/python/Testing/ZopeTestCase/ztc_common.py
lib/python/Testing/ZopeTestCase/ztc_common.py
+10
-1
No files found.
lib/python/Testing/ZopeTestCase/ZopeLite.py
View file @
eb4a6d76
...
@@ -58,8 +58,9 @@ _start = time.time()
...
@@ -58,8 +58,9 @@ _start = time.time()
def
_configure_logging
():
def
_configure_logging
():
# Initialize the logging module
# Initialize the logging module
if
not
sys
.
modules
.
has_key
(
'logging'
):
import
logging
import
logging
root
=
logging
.
getLogger
()
if
not
root
.
handlers
:
logging
.
basicConfig
()
logging
.
basicConfig
()
def
_configure_debug_mode
():
def
_configure_debug_mode
():
...
...
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
View file @
eb4a6d76
...
@@ -5,6 +5,7 @@ Unreleased
...
@@ -5,6 +5,7 @@ Unreleased
- installProduct() now becomes a noop if ZopeTestCase did not apply its
- installProduct() now becomes a noop if ZopeTestCase did not apply its
patches.
patches.
- Made the functional doc tests set the cookie related headers.
- Made the functional doc tests set the cookie related headers.
- Made sure logging is configured. Read $INSTANCE_HOME/log.ini if it exists.
0.9.8 (Zope 2.8 edition)
0.9.8 (Zope 2.8 edition)
- Renamed 'doctest' package to 'zopedoctest' because of name-shadowing
- Renamed 'doctest' package to 'zopedoctest' because of name-shadowing
...
...
lib/python/Testing/ZopeTestCase/ztc_common.py
View file @
eb4a6d76
...
@@ -17,7 +17,7 @@ This file must be called from framework.py like so
...
@@ -17,7 +17,7 @@ This file must be called from framework.py like so
execfile(os.path.join(os.path.dirname(Testing.__file__),
execfile(os.path.join(os.path.dirname(Testing.__file__),
'ZopeTestCase', 'ztc_common.py'))
'ZopeTestCase', 'ztc_common.py'))
$Id
: ztc_common.py,v 1.14 2004/05/27 15:06:24 shh42 Exp
$
$Id$
"""
"""
# Overwrites the default framework() method to expose the
# Overwrites the default framework() method to expose the
...
@@ -62,11 +62,13 @@ class Configurator:
...
@@ -62,11 +62,13 @@ class Configurator:
return
return
if
self
.
zeo_instance_home
:
if
self
.
zeo_instance_home
:
self
.
setup_zeo_instance_home
()
self
.
setup_zeo_instance_home
()
self
.
setup_logging
()
else
:
else
:
if
self
.
instance_home
:
if
self
.
instance_home
:
self
.
setup_instance_home
()
self
.
setup_instance_home
()
else
:
else
:
self
.
detect_and_setup_instance_home
()
self
.
detect_and_setup_instance_home
()
self
.
setup_logging
()
self
.
setup_custom_zodb
()
self
.
setup_custom_zodb
()
def
setup_zeo_instance_home
(
self
):
def
setup_zeo_instance_home
(
self
):
...
@@ -128,6 +130,13 @@ class Configurator:
...
@@ -128,6 +130,13 @@ class Configurator:
os
.
environ
[
'INSTANCE_HOME'
]
=
INSTANCE_HOME
=
self
.
cwd
os
.
environ
[
'INSTANCE_HOME'
]
=
INSTANCE_HOME
=
self
.
cwd
self
.
setconfig
(
instancehome
=
self
.
cwd
)
self
.
setconfig
(
instancehome
=
self
.
cwd
)
def
setup_logging
(
self
):
'''If $INSTANCE_HOME/log.ini exists, load it.'''
logini
=
os
.
path
.
join
(
self
.
getconfig
(
'instancehome'
),
'log.ini'
)
if
os
.
path
.
exists
(
logini
):
import
logging.config
logging
.
config
.
fileConfig
(
logini
)
def
add_instance
(
self
,
p
):
def
add_instance
(
self
,
p
):
'''Adds an INSTANCE_HOME directory to Products.__path__ and sys.path.'''
'''Adds an INSTANCE_HOME directory to Products.__path__ and sys.path.'''
import
Products
import
Products
...
...
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