[Python-checkins] r88423 - python/branches/py3k/Doc/library/logging.handlers.rst

georg.brandl python-checkins at python.org
Tue Feb 15 13:41:17 CET 2011


Author: georg.brandl
Date: Tue Feb 15 13:41:17 2011
New Revision: 88423

Log:
Apply logging SocketHandler doc update by Vinay.

Modified:
   python/branches/py3k/Doc/library/logging.handlers.rst

Modified: python/branches/py3k/Doc/library/logging.handlers.rst
==============================================================================
--- python/branches/py3k/Doc/library/logging.handlers.rst	(original)
+++ python/branches/py3k/Doc/library/logging.handlers.rst	Tue Feb 15 13:41:17 2011
@@ -331,6 +331,27 @@
       Send a pickled string *packet* to the socket. This function allows for
       partial sends which can happen when the network is busy.
 
+   .. method:: createSocket()
+
+      Tries to create a socket; on failure, uses an exponential back-off
+      algorithm.  On intial failure, the handler will drop the message it was
+      trying to send.  When subsequent messages are handled by the same
+      instance, it will not try connecting until some time has passed.  The
+      default parameters are such that the initial delay is one second, and if
+      after that delay the connection still can't be made, the handler will
+      double the delay each time up to a maximum of 30 seconds.
+
+      This behaviour is controlled by the following handler attributes:
+
+      * ``retryStart`` (initial delay, defaulting to 1.0 seconds).
+      * ``retryFactor`` (multiplier, defaulting to 2.0).
+      * ``retryMax`` (maximum delay, defaulting to 30.0 seconds).
+
+      This means that if the remote listener starts up *after* the handler has
+      been used, you could lose messages (since the handler won't even attempt
+      a connection until the delay has elapsed, but just silently drop messages
+      during the delay period).
+^
 
 .. _datagram-handler:
 


More information about the Python-checkins mailing list