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
c7f0524e
Commit
c7f0524e
authored
Jan 08, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zLOG -> logging
parent
5c4431b7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
19 deletions
+21
-19
lib/python/Products/PluginIndexes/DateIndex/DateIndex.py
lib/python/Products/PluginIndexes/DateIndex/DateIndex.py
+5
-5
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
+7
-8
lib/python/Products/PythonScripts/PythonScript.py
lib/python/Products/PythonScripts/PythonScript.py
+6
-3
lib/python/Products/ZCatalog/ProgressHandler.py
lib/python/Products/ZCatalog/ProgressHandler.py
+3
-3
No files found.
lib/python/Products/PluginIndexes/DateIndex/DateIndex.py
View file @
c7f0524e
...
...
@@ -16,6 +16,7 @@ $Id$
"""
import
time
from
logging
import
getLogger
from
datetime
import
date
,
datetime
from
datetime
import
tzinfo
,
timedelta
from
types
import
StringType
,
FloatType
,
IntType
...
...
@@ -28,7 +29,6 @@ from DateTime.DateTime import DateTime
from
Globals
import
DTMLFile
from
OFS.PropertyManager
import
PropertyManager
from
ZODB.POSException
import
ConflictError
from
zLOG
import
LOG
,
ERROR
from
zope.interface
import
implements
from
Products.PluginIndexes.common
import
safe_callable
...
...
@@ -36,6 +36,7 @@ from Products.PluginIndexes.common.UnIndex import UnIndex
from
Products.PluginIndexes.common.util
import
parseIndexRequest
from
Products.PluginIndexes.interfaces
import
IDateIndex
LOG
=
getLogger
(
'DateIndex'
)
_marker
=
[]
###############################################################################
...
...
@@ -144,10 +145,9 @@ class DateIndex(UnIndex, PropertyManager):
except
ConflictError
:
raise
except
:
LOG
(
'UnIndex'
,
ERROR
,
(
"Should not happen: ConvertedDate was there,"
LOG
.
error
(
"Should not happen: ConvertedDate was there,"
" now it's not, for document with id %s"
%
documentId
)
)
documentId
)
if
ConvertedDate
is
not
_marker
:
self
.
insertForwardIndexEntry
(
ConvertedDate
,
documentId
)
...
...
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
View file @
c7f0524e
...
...
@@ -19,9 +19,9 @@ import operator, warnings
import
re
from
cgi
import
escape
from
types
import
*
from
logging
import
getLogger
from
Globals
import
Persistent
,
DTMLFile
from
zLOG
import
LOG
,
ERROR
from
Acquisition
import
Implicit
from
OFS.SimpleItem
import
SimpleItem
from
BTrees.IOBTree
import
IOBTree
...
...
@@ -39,6 +39,7 @@ from Products.PluginIndexes.interfaces import ITextIndex
from
Lexicon
import
Lexicon
LOG
=
getLogger
(
'TextIndex'
)
class
Op
:
def
__init__
(
self
,
name
):
...
...
@@ -376,8 +377,7 @@ class TextIndex(Persistent, Implicit, SimpleItem):
for
wid
in
wids
:
widScores
=
get
(
wid
,
None
)
if
widScores
is
None
:
LOG
(
'TextIndex'
,
ERROR
,
'unindex_object tried to unindex nonexistent'
LOG
.
error
(
'unindex_object tried to unindex nonexistent'
' document, wid %s, %s'
%
(
i
,
wid
))
continue
if
type
(
widScores
)
is
TupleType
:
...
...
@@ -394,8 +394,7 @@ class TextIndex(Persistent, Implicit, SimpleItem):
else
:
del
index
[
wid
]
except
(
KeyError
,
IndexError
,
TypeError
):
LOG
(
'TextIndex'
,
ERROR
,
'unindex_object tried to unindex nonexistent'
LOG
.
error
(
'unindex_object tried to unindex nonexistent'
' document %s'
%
str
(
i
))
def
__getitem__
(
self
,
word
):
...
...
lib/python/Products/PythonScripts/PythonScript.py
View file @
c7f0524e
...
...
@@ -20,6 +20,7 @@ Python code.
__version__
=
'$Revision: 1.56 $'
[
11
:
-
2
]
import
sys
,
os
,
traceback
,
re
,
marshal
,
new
from
logging
import
getLogger
from
Globals
import
DTMLFile
,
MessageDialog
,
package_home
import
AccessControl
,
OFS
,
RestrictedPython
from
Acquisition
import
aq_parent
...
...
@@ -33,10 +34,12 @@ from AccessControl import getSecurityManager
from
OFS.History
import
Historical
,
html_diff
from
OFS.Cache
import
Cacheable
from
AccessControl.ZopeGuards
import
get_safe_globals
,
guarded_getattr
from
zLOG
import
LOG
,
ERROR
,
INFO
,
PROBLEM
from
zExceptions
import
Forbidden
import
Globals
LOG
=
getLogger
(
'PythonScripts'
)
# Track the Python bytecode version
import
imp
Python_magic
=
imp
.
get_magic
()
...
...
@@ -209,7 +212,7 @@ class PythonScript(Script, Historical, Cacheable):
getattr(self, '
Script_magic
', None) != Script_magic):
global _log_complaint
if _log_complaint:
LOG
(self.meta_type, INFO,
_log_complaint)
LOG
.info(
_log_complaint)
_log_complaint = 0
# Changes here won'
t
get
saved
,
unless
this
Script
is
edited
.
body
=
self
.
_body
.
rstrip
()
...
...
@@ -438,7 +441,7 @@ class PythonScript(Script, Historical, Cacheable):
else
:
self
.
_makeFunction
()
except
:
LOG
(
self
.
meta_type
,
ERROR
,
'write failed'
,
error
=
sys
.
exc_info
())
LOG
.
error
(
'write failed'
,
exc_info
=
sys
.
exc_info
())
raise
def
manage_FTPget
(
self
):
...
...
lib/python/Products/ZCatalog/ProgressHandler.py
View file @
c7f0524e
...
...
@@ -15,12 +15,12 @@ $Id$
"""
import
time
,
sys
from
zLOG
import
LOG
,
INFO
from
logging
import
getLogger
from
DateTime.DateTime
import
DateTime
from
Interface
import
Interface
LOG
=
getLogger
(
'ProgressHandler'
)
class
IProgressHandler
(
Interface
):
""" A handler to log progress informations for long running
...
...
@@ -92,7 +92,7 @@ class ZLogHandler(StdoutHandler):
__implements__
=
IProgressHandler
def
output
(
self
,
text
):
LOG
(
self
.
_ident
,
INFO
,
text
)
LOG
.
info
(
text
)
class
FilelogHandler
(
StdoutHandler
):
...
...
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