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
4a70486c
Commit
4a70486c
authored
Mar 31, 2005
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added threadName and now using re-entrant lock
parent
a6e8a4ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Lib/logging/__init__.py
Lib/logging/__init__.py
+5
-2
No files found.
Lib/logging/__init__.py
View file @
4a70486c
...
...
@@ -42,7 +42,7 @@ except ImportError:
__author__
=
"Vinay Sajip <vinay_sajip@red-dove.com>"
__status__
=
"beta"
__version__
=
"0.4.9.6"
__date__
=
"
12
March 2005"
__date__
=
"
27
March 2005"
#---------------------------------------------------------------------------
# Miscellaneous module data
...
...
@@ -241,8 +241,10 @@ class LogRecord:
self
.
relativeCreated
=
(
self
.
created
-
_startTime
)
*
1000
if
thread
:
self
.
thread
=
thread
.
get_ident
()
self
.
threadName
=
threading
.
currentThread
().
getName
()
else
:
self
.
thread
=
None
self
.
threadName
=
None
if
hasattr
(
os
,
'getpid'
):
self
.
process
=
os
.
getpid
()
else
:
...
...
@@ -320,6 +322,7 @@ class Formatter:
relative to the time the logging module was loaded
(typically at application startup time)
%(thread)d Thread ID (if available)
%(threadName)s Thread name (if available)
%(process)d Process ID (if available)
%(message)s The result of record.getMessage(), computed just as
the record is emitted
...
...
@@ -570,7 +573,7 @@ class Handler(Filterer):
Acquire a thread lock for serializing access to the underlying I/O.
"""
if
thread
:
self
.
lock
=
thread
.
allocate_l
ock
()
self
.
lock
=
thread
ing
.
RL
ock
()
else
:
self
.
lock
=
None
...
...
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