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
a502367d
Commit
a502367d
authored
May 12, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
death to zLOG
parent
142bdccd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lib/python/Products/SiteErrorLog/SiteErrorLog.py
lib/python/Products/SiteErrorLog/SiteErrorLog.py
+5
-4
No files found.
lib/python/Products/SiteErrorLog/SiteErrorLog.py
View file @
a502367d
...
...
@@ -19,6 +19,7 @@ $Id: SiteErrorLog.py,v 1.17 2003/11/18 13:17:07 tseaver Exp $
import
os
import
sys
import
time
import
logging
from
random
import
random
from
thread
import
allocate_lock
from
types
import
StringType
,
UnicodeType
...
...
@@ -29,7 +30,8 @@ from AccessControl import ClassSecurityInfo, getSecurityManager, Unauthorized
from
OFS.SimpleItem
import
SimpleItem
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
zExceptions.ExceptionFormatter
import
format_exception
from
zLOG
import
LOG
,
ERROR
LOG
=
logging
.
getLogger
(
'Zope.SiteErrorLog'
)
# Permission names
use_error_logging
=
'Log Site Errors'
...
...
@@ -194,8 +196,7 @@ class SiteErrorLog (SimpleItem):
finally
:
cleanup_lock
.
release
()
except
:
LOG
(
'SiteError'
,
ERROR
,
'Error while logging'
,
error
=
sys
.
exc_info
())
LOG
.
error
(
'Error while logging'
,
exc_info
=
sys
.
exc_info
())
else
:
if
self
.
copy_to_zlog
:
self
.
_do_copy_to_zlog
(
now
,
strtype
,
str
(
url
),
info
)
...
...
@@ -209,7 +210,7 @@ class SiteErrorLog (SimpleItem):
next_when
=
max
(
when
,
now
-
_rate_restrict_burst
*
_rate_restrict_period
)
next_when
+=
_rate_restrict_period
_rate_restrict_pool
[
strtype
]
=
next_when
LOG
(
'SiteError'
,
ERROR
,
str
(
url
),
error
=
info
)
LOG
.
error
(
str
(
url
),
exc_info
=
info
)
security
.
declareProtected
(
use_error_logging
,
'getProperties'
)
def
getProperties
(
self
):
...
...
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