Skip to content

Instantly share code, notes, and snippets.

@vsajip
Created February 13, 2011 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsajip/824644 to your computer and use it in GitHub Desktop.
Save vsajip/824644 to your computer and use it in GitHub Desktop.
Index: Doc/library/logging.handlers.rst
===================================================================
--- Doc/library/logging.handlers.rst (revision 88415)
+++ Doc/library/logging.handlers.rst (working copy)
@@ -332,6 +332,27 @@
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:
DatagramHandler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment