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
b92adb19
Commit
b92adb19
authored
Jun 16, 2005
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- replaced MessageDialog by less annoying manage_tabs_message
- some related cleanup
parent
d888bbc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
lib/python/Products/SiteErrorLog/SiteErrorLog.py
lib/python/Products/SiteErrorLog/SiteErrorLog.py
+7
-9
No files found.
lib/python/Products/SiteErrorLog/SiteErrorLog.py
View file @
b92adb19
...
...
@@ -22,7 +22,6 @@ import time
import
logging
from
random
import
random
from
thread
import
allocate_lock
from
types
import
StringType
,
UnicodeType
import
Globals
from
Acquisition
import
aq_base
...
...
@@ -117,9 +116,6 @@ class SiteErrorLog (SimpleItem):
temp_logs
[
self
.
_p_oid
]
=
log
return
log
# Exceptions that happen all the time, so we dont need
# to log them. Eventually this should be configured
# through-the-web.
security
.
declareProtected
(
use_error_logging
,
'forgetEntry'
)
def
forgetEntry
(
self
,
id
,
REQUEST
=
None
):
"""Removes an entry from the error log."""
...
...
@@ -132,10 +128,13 @@ class SiteErrorLog (SimpleItem):
i
+=
1
cleanup_lock
.
release
()
if
REQUEST
is
not
None
:
return
Globals
.
MessageDialog
(
title
=
'Entry removed'
,
message
=
'Error log entry was removed.'
,
action
=
'./manage_main'
,
)
REQUEST
.
RESPONSE
.
redirect
(
'%s/manage_main?manage_tabs_message=Error+log+entry+was+removed.'
%
self
.
absolute_url
()
)
# Exceptions that happen all the time, so we dont need
# to log them. Eventually this should be configured
# through-the-web.
_ignored_exceptions
=
(
'Unauthorized'
,
'NotFound'
,
'Redirect'
)
security
.
declarePrivate
(
'raising'
)
...
...
@@ -155,8 +154,7 @@ class SiteErrorLog (SimpleItem):
if
strtype
in
self
.
_ignored_exceptions
:
return
if
not
isinstance
(
info
[
2
],
StringType
)
and
not
isinstance
(
info
[
2
],
UnicodeType
):
if
not
isinstance
(
info
[
2
],
basestring
):
tb_text
=
''
.
join
(
format_exception
(
*
info
,
**
{
'as_html'
:
0
}))
tb_html
=
''
.
join
(
...
...
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