Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6d50b37b
Commit
6d50b37b
authored
Sep 29, 2009
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #7014: logging: Improved IronPython 2.6 compatibility.
parent
87b4e726
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
Lib/logging/__init__.py
Lib/logging/__init__.py
+12
-5
No files found.
Lib/logging/__init__.py
View file @
6d50b37b
...
...
@@ -271,11 +271,14 @@ class LogRecord:
else
:
self
.
thread
=
None
self
.
threadName
=
None
if
logMultiprocessing
:
from
multiprocessing
import
current_process
self
.
processName
=
current_process
().
name
else
:
if
not
logMultiprocessing
:
self
.
processName
=
None
else
:
try
:
from
multiprocessing
import
current_process
self
.
processName
=
current_process
().
name
except
ImportError
:
self
.
processName
=
None
if
logProcesses
and
hasattr
(
os
,
'getpid'
):
self
.
process
=
os
.
getpid
()
else
:
...
...
@@ -1114,7 +1117,11 @@ class Logger(Filterer):
Find the stack frame of the caller so that we can note the source
file name, line number and function name.
"""
f
=
currentframe
().
f_back
f
=
currentframe
()
#On some versions of IronPython, currentframe() returns None if
#IronPython isn't run with -X:Frames.
if
f
is
not
None
:
f
=
f
.
f_back
rv
=
"(unknown file)"
,
0
,
"(unknown function)"
while
hasattr
(
f
,
"f_code"
):
co
=
f
.
f_code
...
...
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