Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9a0fc97b
Kaydet (Commit)
9a0fc97b
authored
Ock 18, 2009
tarafından
Jesse Noller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
merge cl r68737 to py3k
üst
e1cdfd78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
24 deletions
+13
-24
__init__.py
Lib/logging/__init__.py
+10
-0
util.py
Lib/multiprocessing/util.py
+0
-24
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
9a0fc97b
...
@@ -98,6 +98,11 @@ raiseExceptions = 1
...
@@ -98,6 +98,11 @@ raiseExceptions = 1
#
#
logThreads
=
1
logThreads
=
1
#
# If you don't want multiprocessing information in the log, set this to zero
#
logMultiprocessing
=
1
#
#
# If you don't want process information in the log, set this to zero
# If you don't want process information in the log, set this to zero
#
#
...
@@ -263,6 +268,11 @@ class LogRecord:
...
@@ -263,6 +268,11 @@ class LogRecord:
else
:
else
:
self
.
thread
=
None
self
.
thread
=
None
self
.
threadName
=
None
self
.
threadName
=
None
if
logMultiprocessing
:
from
multiprocessing
import
current_process
self
.
processName
=
current_process
()
.
name
else
:
self
.
processName
=
None
if
logProcesses
and
hasattr
(
os
,
'getpid'
):
if
logProcesses
and
hasattr
(
os
,
'getpid'
):
self
.
process
=
os
.
getpid
()
self
.
process
=
os
.
getpid
()
else
:
else
:
...
...
Lib/multiprocessing/util.py
Dosyayı görüntüle @
9a0fc97b
...
@@ -69,34 +69,10 @@ def get_logger():
...
@@ -69,34 +69,10 @@ def get_logger():
atexit
.
_exithandlers
.
remove
((
_exit_function
,
(),
{}))
atexit
.
_exithandlers
.
remove
((
_exit_function
,
(),
{}))
atexit
.
_exithandlers
.
append
((
_exit_function
,
(),
{}))
atexit
.
_exithandlers
.
append
((
_exit_function
,
(),
{}))
_check_logger_class
()
_logger
=
logging
.
getLogger
(
LOGGER_NAME
)
_logger
=
logging
.
getLogger
(
LOGGER_NAME
)
return
_logger
return
_logger
def
_check_logger_class
():
'''
Make sure process name is recorded when loggers are used
'''
# XXX This function is unnecessary once logging is patched
import
logging
if
hasattr
(
logging
,
'multiprocessing'
):
return
logging
.
_acquireLock
()
try
:
OldLoggerClass
=
logging
.
getLoggerClass
()
if
not
getattr
(
OldLoggerClass
,
'_process_aware'
,
False
):
class
ProcessAwareLogger
(
OldLoggerClass
):
_process_aware
=
True
def
makeRecord
(
self
,
*
args
,
**
kwds
):
record
=
OldLoggerClass
.
makeRecord
(
self
,
*
args
,
**
kwds
)
record
.
processName
=
current_process
()
.
_name
return
record
logging
.
setLoggerClass
(
ProcessAwareLogger
)
finally
:
logging
.
_releaseLock
()
def
log_to_stderr
(
level
=
None
):
def
log_to_stderr
(
level
=
None
):
'''
'''
Turn on logging and add a handler which prints to stderr
Turn on logging and add a handler which prints to stderr
...
...
Misc/NEWS
Dosyayı görüntüle @
9a0fc97b
...
@@ -132,6 +132,9 @@ Core and Builtins
...
@@ -132,6 +132,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #4301: Patch the logging module to add processName support, remove
_check_logger_class from multiprocessing.
- Issue #3325: Remove python2.x try: except: imports for old cPickle from
- Issue #3325: Remove python2.x try: except: imports for old cPickle from
multiprocessing.
multiprocessing.
...
...
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