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
77015590
Commit
77015590
authored
Feb 07, 2003
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make log entries for NotFound more useful and readable.
parent
9dc3cc85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
lib/python/Products/SiteErrorLog/SiteErrorLog.py
lib/python/Products/SiteErrorLog/SiteErrorLog.py
+12
-6
No files found.
lib/python/Products/SiteErrorLog/SiteErrorLog.py
View file @
77015590
...
...
@@ -13,7 +13,7 @@
##############################################################################
"""Site error log module.
$Id: SiteErrorLog.py,v 1.1
4 2003/01/05 16:19:57 yuppie
Exp $
$Id: SiteErrorLog.py,v 1.1
5 2003/02/07 18:16:37 evan
Exp $
"""
import
os
...
...
@@ -151,6 +151,10 @@ class SiteErrorLog (SimpleItem):
username
=
None
userid
=
None
req_html
=
None
try
:
strv
=
str
(
info
[
1
])
except
:
strv
=
'<unprintable %s object>'
%
type
(
info
[
1
]).
__name__
if
request
:
url
=
request
.
get
(
'URL'
,
'?'
)
usr
=
getSecurityManager
().
getUser
()
...
...
@@ -160,11 +164,13 @@ class SiteErrorLog (SimpleItem):
req_html
=
str
(
request
)
except
:
pass
try
:
strv
=
str
(
info
[
1
])
except
:
strv
=
'<unprintable %s object>'
%
str
(
type
(
info
[
1
]).
__name__
)
if
strtype
==
'NotFound'
:
strv
=
url
next
=
request
[
'TraversalRequestNameStack'
]
if
next
:
next
=
list
(
next
)
next
.
reverse
()
strv
=
'%s [ /%s ]'
%
(
strv
,
'/'
.
join
(
next
))
log
=
self
.
_getLog
()
entry_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