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
728b28c0
Commit
728b28c0
authored
Apr 15, 2002
by
Toby Dickenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added _ignored_exceptions; 'Unauthorized' no longer appears in the error log
parent
7159fa5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lib/python/Products/SiteErrorLog/SiteErrorLog.py
lib/python/Products/SiteErrorLog/SiteErrorLog.py
+11
-2
No files found.
lib/python/Products/SiteErrorLog/SiteErrorLog.py
View file @
728b28c0
...
...
@@ -13,7 +13,7 @@
##############################################################################
"""Site error log module.
$Id: SiteErrorLog.py,v 1.
4 2002/04/05 16:01:55
htrd Exp $
$Id: SiteErrorLog.py,v 1.
5 2002/04/15 10:52:30
htrd Exp $
"""
import
os
...
...
@@ -97,6 +97,11 @@ 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.
_ignored_exceptions
=
(
'Unauthorized'
,
)
security
.
declarePrivate
(
'raising'
)
def
raising
(
self
,
info
):
"""Log an exception.
...
...
@@ -109,6 +114,10 @@ class SiteErrorLog (SimpleItem):
tb_text
=
None
tb_html
=
None
strtype
=
str
(
getattr
(
info
[
0
],
'__name__'
,
info
[
0
]))
if
strtype
in
self
.
_ignored_exceptions
:
return
if
not
isinstance
(
info
[
2
],
StringType
)
and
not
isinstance
(
info
[
2
],
UnicodeType
):
tb_text
=
''
.
join
(
...
...
@@ -137,7 +146,7 @@ class SiteErrorLog (SimpleItem):
log
=
self
.
_getLog
()
log
.
append
({
'type'
:
str
(
getattr
(
info
[
0
],
'__name__'
,
info
[
0
]))
,
'type'
:
str
type
,
'value'
:
strv
,
'time'
:
now
,
'id'
:
str
(
now
)
+
str
(
random
()),
# Low chance of collision
...
...
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