MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/logging/handlers.py:560–583  ·  view source on GitHub ↗

Initializes the handler with a specific host address and port. When the attribute *closeOnError* is set to True - if a socket error occurs, the socket is silently closed and then reopened on the next logging call.

(self, host, port)

Source from the content-addressed store, hash-verified

558 """
559
560 def __init__(self, host, port):
561 """
562 Initializes the handler with a specific host address and port.
563
564 When the attribute *closeOnError* is set to True - if a socket error
565 occurs, the socket is silently closed and then reopened on the next
566 logging call.
567 """
568 logging.Handler.__init__(self)
569 self.host = host
570 self.port = port
571 if port is None:
572 self.address = host
573 else:
574 self.address = (host, port)
575 self.sock = None
576 self.closeOnError = False
577 self.retryTime = None
578 #
579 # Exponential backoff parameters.
580 #
581 self.retryStart = 1.0
582 self.retryMax = 30.0
583 self.retryFactor = 2.0
584
585 def makeSocket(self, timeout=1):
586 """

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected