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
5c4431b7
Commit
5c4431b7
authored
Jan 08, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dprecated zLOG module
parent
5464fb23
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
11 deletions
+22
-11
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/OFS/PropertyManager.py
lib/python/OFS/PropertyManager.py
+0
-1
lib/python/Products/BTreeFolder2/BTreeFolder2.py
lib/python/Products/BTreeFolder2/BTreeFolder2.py
+8
-7
lib/python/Products/Transience/Transience.py
lib/python/Products/Transience/Transience.py
+3
-2
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+0
-1
lib/python/zLOG/__init__.py
lib/python/zLOG/__init__.py
+9
-0
No files found.
doc/CHANGES.txt
View file @
5c4431b7
...
@@ -26,6 +26,8 @@ Zope Changes
...
@@ -26,6 +26,8 @@ Zope Changes
Features added
Features added
- deprecated the zLOG module. Use Pythons 'logging' module instead
- PluginIndexes/TextIndex is deprecated. Use ZCTextIndex instead
- PluginIndexes/TextIndex is deprecated. Use ZCTextIndex instead
- the 'StructuredText' module is deprecated. Use zope.structuredtext
- the 'StructuredText' module is deprecated. Use zope.structuredtext
...
...
lib/python/OFS/PropertyManager.py
View file @
5c4431b7
...
@@ -180,7 +180,6 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
...
@@ -180,7 +180,6 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
# for selection and multiple selection properties
# for selection and multiple selection properties
# the value argument indicates the select variable
# the value argument indicates the select variable
# of the property
# of the property
self
.
_wrapperCheck
(
value
)
self
.
_wrapperCheck
(
value
)
if
not
self
.
valid_property_id
(
id
):
if
not
self
.
valid_property_id
(
id
):
raise
BadRequest
,
'Invalid or duplicate property id'
raise
BadRequest
,
'Invalid or duplicate property id'
...
...
lib/python/Products/BTreeFolder2/BTreeFolder2.py
View file @
5c4431b7
...
@@ -21,6 +21,7 @@ from cgi import escape
...
@@ -21,6 +21,7 @@ from cgi import escape
from
urllib
import
quote
from
urllib
import
quote
from
random
import
randint
from
random
import
randint
from
types
import
StringType
from
types
import
StringType
from
logging
import
getLogger
import
Globals
import
Globals
from
Globals
import
DTMLFile
from
Globals
import
DTMLFile
...
@@ -35,7 +36,6 @@ from OFS.Folder import Folder
...
@@ -35,7 +36,6 @@ from OFS.Folder import Folder
from
AccessControl
import
getSecurityManager
,
ClassSecurityInfo
from
AccessControl
import
getSecurityManager
,
ClassSecurityInfo
from
AccessControl.Permissions
import
access_contents_information
,
\
from
AccessControl.Permissions
import
access_contents_information
,
\
view_management_screens
view_management_screens
from
zLOG
import
LOG
,
INFO
,
ERROR
,
WARNING
from
Products.ZCatalog.Lazy
import
LazyMap
from
Products.ZCatalog.Lazy
import
LazyMap
from
zope.event
import
notify
from
zope.event
import
notify
from
zope.app.container.contained
import
ObjectAddedEvent
from
zope.app.container.contained
import
ObjectAddedEvent
...
@@ -46,6 +46,8 @@ from OFS.event import ObjectWillBeRemovedEvent
...
@@ -46,6 +46,8 @@ from OFS.event import ObjectWillBeRemovedEvent
import
OFS.subscribers
import
OFS.subscribers
LOG
=
getLogger
(
'BTreeFolder2'
)
manage_addBTreeFolderForm
=
DTMLFile
(
'folderAdd'
,
globals
())
manage_addBTreeFolderForm
=
DTMLFile
(
'folderAdd'
,
globals
())
def
manage_addBTreeFolder
(
dispatcher
,
id
,
title
=
''
,
REQUEST
=
None
):
def
manage_addBTreeFolder
(
dispatcher
,
id
,
title
=
''
,
REQUEST
=
None
):
...
@@ -191,9 +193,8 @@ class BTreeFolder2Base (Persistent):
...
@@ -191,9 +193,8 @@ class BTreeFolder2Base (Persistent):
%
repr
(
key
))
%
repr
(
key
))
return
1
return
1
except
AssertionError
:
except
AssertionError
:
LOG
(
'BTreeFolder2'
,
WARNING
,
LOG
.
warn
(
'Detected damage to %s. Fixing now.'
%
path
,
'Detected damage to %s. Fixing now.'
%
path
,
exc_info
=
sys
.
exc_info
())
error
=
sys
.
exc_info
())
try
:
try
:
self
.
_tree
=
OOBTree
(
self
.
_tree
)
self
.
_tree
=
OOBTree
(
self
.
_tree
)
mt_index
=
OOBTree
()
mt_index
=
OOBTree
()
...
@@ -201,11 +202,11 @@ class BTreeFolder2Base (Persistent):
...
@@ -201,11 +202,11 @@ class BTreeFolder2Base (Persistent):
mt_index
[
key
]
=
OIBTree
(
value
)
mt_index
[
key
]
=
OIBTree
(
value
)
self
.
_mt_index
=
mt_index
self
.
_mt_index
=
mt_index
except
:
except
:
LOG
(
'BTreeFolder2'
,
ERROR
,
'Failed to fix %s.'
%
path
,
LOG
.
error
(
'Failed to fix %s.'
%
path
,
e
rror
=
sys
.
exc_info
())
e
xc_info
=
sys
.
exc_info
())
raise
raise
else
:
else
:
LOG
(
'BTreeFolder2'
,
INFO
,
'Fixed %s.'
%
path
)
LOG
.
info
(
'Fixed %s.'
%
path
)
return
0
return
0
...
...
lib/python/Products/Transience/Transience.py
View file @
5c4431b7
...
@@ -40,7 +40,7 @@ from AccessControl import ClassSecurityInfo, getSecurityManager
...
@@ -40,7 +40,7 @@ from AccessControl import ClassSecurityInfo, getSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
,
\
from
AccessControl.SecurityManagement
import
newSecurityManager
,
\
setSecurityManager
setSecurityManager
from
AccessControl.User
import
nobody
from
AccessControl.User
import
nobody
from
zLOG
import
LOG
,
WARNING
,
INFO
from
logging
import
getLogger
from
TransientObject
import
TransientObject
from
TransientObject
import
TransientObject
from
Fake
import
FakeIOBTree
from
Fake
import
FakeIOBTree
...
@@ -59,6 +59,7 @@ STRICT = os.environ.get('Z_TOC_STRICT', '')
...
@@ -59,6 +59,7 @@ STRICT = os.environ.get('Z_TOC_STRICT', '')
DEBUG
=
int
(
os
.
environ
.
get
(
'Z_TOC_DEBUG'
,
0
))
DEBUG
=
int
(
os
.
environ
.
get
(
'Z_TOC_DEBUG'
,
0
))
_marker
=
[]
_marker
=
[]
LOG
=
getLogger
(
'Transience'
)
def
setStrict
(
on
=
''
):
def
setStrict
(
on
=
''
):
""" Turn on assertions (which may cause conflicts) """
""" Turn on assertions (which may cause conflicts) """
...
@@ -72,7 +73,7 @@ def TLOG(*args):
...
@@ -72,7 +73,7 @@ def TLOG(*args):
for
arg
in
args
:
for
arg
in
args
:
sargs
.
append
(
str
(
arg
))
sargs
.
append
(
str
(
arg
))
msg
=
' '
.
join
(
sargs
)
msg
=
' '
.
join
(
sargs
)
LOG
(
'Transience'
,
INFO
,
msg
)
LOG
.
info
(
msg
)
constructTransientObjectContainerForm
=
HTMLFile
(
constructTransientObjectContainerForm
=
HTMLFile
(
'dtml/addTransientObjectContainer'
,
globals
())
'dtml/addTransientObjectContainer'
,
globals
())
...
...
lib/python/Products/ZCatalog/ZCatalog.py
View file @
5c4431b7
...
@@ -38,7 +38,6 @@ from Products.PluginIndexes.common.PluggableIndex \
...
@@ -38,7 +38,6 @@ from Products.PluginIndexes.common.PluggableIndex \
import
PluggableIndexInterface
import
PluggableIndexInterface
from
Products.PluginIndexes.interfaces
import
IPluggableIndex
from
Products.PluginIndexes.interfaces
import
IPluggableIndex
from
Products.PluginIndexes.TextIndex
import
Splitter
from
Products.PluginIndexes.TextIndex
import
Splitter
from
zLOG
import
LOG
from
zope.interface
import
implements
from
zope.interface
import
implements
from
Catalog
import
Catalog
,
CatalogError
from
Catalog
import
Catalog
,
CatalogError
...
...
lib/python/zLOG/__init__.py
View file @
5c4431b7
...
@@ -77,6 +77,8 @@ back-end; configuration of the logging module must be handled
...
@@ -77,6 +77,8 @@ back-end; configuration of the logging module must be handled
somewhere else.
somewhere else.
"""
"""
import
warnings
from
EventLogger
import
log_write
,
log_time
,
severity_string
from
EventLogger
import
log_write
,
log_time
,
severity_string
from
traceback
import
format_exception
from
traceback
import
format_exception
...
@@ -131,6 +133,13 @@ def LOG(subsystem, severity, summary, detail='', error=None, reraise=None):
...
@@ -131,6 +133,13 @@ def LOG(subsystem, severity, summary, detail='', error=None, reraise=None):
error is reraised.
error is reraised.
"""
"""
warnings
.
warn
(
'Using the zLOG module is deprecated (to be removed in '
'Zope 2.12. Use the Python logging module instead.'
DeprecationWarning
,
stacklevel
=
2
)
log_write
(
subsystem
,
severity
,
summary
,
detail
,
error
)
log_write
(
subsystem
,
severity
,
summary
,
detail
,
error
)
if
reraise
and
error
:
if
reraise
and
error
:
raise
error
[
0
],
error
[
1
],
error
[
2
]
raise
error
[
0
],
error
[
1
],
error
[
2
]
...
...
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