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
eb068f9f
Kaydet (Commit)
eb068f9f
authored
Agu 11, 2012
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix casing of SocketServer module in 2.7.
üst
d26b658f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
logging-cookbook.rst
Doc/howto/logging-cookbook.rst
+5
-5
No files found.
Doc/howto/logging-cookbook.rst
Dosyayı görüntüle @
eb068f9f
...
@@ -295,17 +295,17 @@ the receiving end. A simple way of doing this is attaching a
...
@@ -295,17 +295,17 @@ the receiving end. A simple way of doing this is attaching a
logger2.warning('Jail zesty vixen who grabbed pay from quack.')
logger2.warning('Jail zesty vixen who grabbed pay from quack.')
logger2.error('The five boxing wizards jump quickly.')
logger2.error('The five boxing wizards jump quickly.')
At the receiving end, you can set up a receiver using the :mod:`
sockets
erver`
At the receiving end, you can set up a receiver using the :mod:`
SocketS
erver`
module. Here is a basic working example::
module. Here is a basic working example::
import pickle
import pickle
import logging
import logging
import logging.handlers
import logging.handlers
import
sockets
erver
import
SocketS
erver
import struct
import struct
class LogRecordStreamHandler(
sockets
erver.StreamRequestHandler):
class LogRecordStreamHandler(
SocketS
erver.StreamRequestHandler):
"""Handler for a streaming logging request.
"""Handler for a streaming logging request.
This basically logs the record using whatever logging policy is
This basically logs the record using whatever logging policy is
...
@@ -347,7 +347,7 @@ module. Here is a basic working example::
...
@@ -347,7 +347,7 @@ module. Here is a basic working example::
# cycles and network bandwidth!
# cycles and network bandwidth!
logger.handle(record)
logger.handle(record)
class LogRecordSocketReceiver(
sockets
erver.ThreadingTCPServer):
class LogRecordSocketReceiver(
SocketS
erver.ThreadingTCPServer):
"""
"""
Simple TCP socket-based logging receiver suitable for testing.
Simple TCP socket-based logging receiver suitable for testing.
"""
"""
...
@@ -357,7 +357,7 @@ module. Here is a basic working example::
...
@@ -357,7 +357,7 @@ module. Here is a basic working example::
def __init__(self, host='localhost',
def __init__(self, host='localhost',
port=logging.handlers.DEFAULT_TCP_LOGGING_PORT,
port=logging.handlers.DEFAULT_TCP_LOGGING_PORT,
handler=LogRecordStreamHandler):
handler=LogRecordStreamHandler):
sockets
erver.ThreadingTCPServer.__init__(self, (host, port), handler)
SocketS
erver.ThreadingTCPServer.__init__(self, (host, port), handler)
self.abort = 0
self.abort = 0
self.timeout = 1
self.timeout = 1
self.logname = None
self.logname = 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