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
0516b906
Commit
0516b906
authored
Jul 21, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added stderr logging when in Z_DEBUG_MODE
parent
60e547d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
lib/python/ZLogger/stupidFileLogger.py
lib/python/ZLogger/stupidFileLogger.py
+20
-1
lib/python/Zope/ZLogger/stupidFileLogger.py
lib/python/Zope/ZLogger/stupidFileLogger.py
+20
-1
No files found.
lib/python/ZLogger/stupidFileLogger.py
View file @
0516b906
import
time
,
sys
,
string
import
time
,
sys
,
string
,
os
_stupid_dest
=
None
...
...
@@ -56,6 +56,22 @@ def stupid_log_write(subsystem, severity, summary, detail, error):
else
:
_stupid_dest
=
_no_stupid_log
import
os
if
os
.
environ
.
has_key
(
'Z_DEBUG_MODE'
):
import
sys
sys
.
stderr
.
write
(
"------
\
n
"
"%s %s %s %s
\
n
%s"
%
(
log_time
(),
severity_string
(
severity
),
subsystem
,
summary
,
detail
,
)
)
sys
.
stderr
.
flush
()
if
_stupid_dest
is
_no_stupid_log
:
return
_stupid_dest
.
write
(
...
...
@@ -69,6 +85,9 @@ def stupid_log_write(subsystem, severity, summary, detail, error):
detail
,
)
)
_stupid_dest
.
flush
()
if
error
:
...
...
lib/python/Zope/ZLogger/stupidFileLogger.py
View file @
0516b906
import
time
,
sys
,
string
import
time
,
sys
,
string
,
os
_stupid_dest
=
None
...
...
@@ -56,6 +56,22 @@ def stupid_log_write(subsystem, severity, summary, detail, error):
else
:
_stupid_dest
=
_no_stupid_log
import
os
if
os
.
environ
.
has_key
(
'Z_DEBUG_MODE'
):
import
sys
sys
.
stderr
.
write
(
"------
\
n
"
"%s %s %s %s
\
n
%s"
%
(
log_time
(),
severity_string
(
severity
),
subsystem
,
summary
,
detail
,
)
)
sys
.
stderr
.
flush
()
if
_stupid_dest
is
_no_stupid_log
:
return
_stupid_dest
.
write
(
...
...
@@ -69,6 +85,9 @@ def stupid_log_write(subsystem, severity, summary, detail, error):
detail
,
)
)
_stupid_dest
.
flush
()
if
error
:
...
...
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