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
cafa2efe
Kaydet (Commit)
cafa2efe
authored
May 02, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
logging: don't define QueueListener if Python has no thread support
üst
b912c5a0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
handlers.py
Lib/logging/handlers.py
+6
-2
test_logging.py
Lib/test/test_logging.py
+2
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/handlers.py
Dosyayı görüntüle @
cafa2efe
...
...
@@ -27,7 +27,10 @@ To use, simply 'import logging.handlers' and log away!
import
logging
,
socket
,
os
,
pickle
,
struct
,
time
,
re
from
stat
import
ST_DEV
,
ST_INO
,
ST_MTIME
import
queue
import
threading
try
:
import
threading
except
ImportError
:
threading
=
None
try
:
import
codecs
...
...
@@ -1218,7 +1221,8 @@ class QueueHandler(logging.Handler):
except
:
self
.
handleError
(
record
)
class
QueueListener
(
object
):
if
threading
:
class
QueueListener
(
object
):
"""
This class implements an internal threaded listener which watches for
LogRecords being added to a queue, removes them and passes them to a
...
...
Lib/test/test_logging.py
Dosyayı görüntüle @
cafa2efe
...
...
@@ -2093,6 +2093,8 @@ class QueueHandlerTest(BaseTest):
self
.
assertEqual
(
data
.
name
,
self
.
que_logger
.
name
)
self
.
assertEqual
((
data
.
msg
,
data
.
args
),
(
msg
,
None
))
@unittest.skipUnless
(
hasattr
(
logging
.
handlers
,
'QueueListener'
),
'logging.handlers.QueueListener required for this test'
)
def
test_queue_listener
(
self
):
handler
=
TestHandler
(
Matcher
())
listener
=
logging
.
handlers
.
QueueListener
(
self
.
queue
,
handler
)
...
...
Misc/NEWS
Dosyayı görüntüle @
cafa2efe
...
...
@@ -79,6 +79,8 @@ Core and Builtins
Library
-------
-
logging
:
don
't define QueueListener if Python has no thread support.
- Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get
around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
...
...
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