[Python-checkins] cpython (merge 3.2 -> default): Updated handler documentation.
vinay.sajip
python-checkins at python.org
Mon Mar 26 18:17:59 CEST 2012
http://hg.python.org/cpython/rev/3bb51f26f3bf
changeset: 75948:3bb51f26f3bf
parent: 75945:1ab8fa2277d9
parent: 75947:9c234943efc2
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Mon Mar 26 17:17:39 2012 +0100
summary:
Updated handler documentation.
files:
Doc/library/logging.handlers.rst | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -704,7 +704,7 @@
supports sending logging messages to an email address via SMTP.
-.. class:: SMTPHandler(mailhost, fromaddr, toaddrs, subject, credentials=None, secure=None)
+.. class:: SMTPHandler(mailhost, fromaddr, toaddrs, subject, credentials=None, secure=None, timeout=1.0)
Returns a new instance of the :class:`SMTPHandler` class. The instance is
initialized with the from and to addresses and subject line of the email. The
@@ -720,6 +720,12 @@
and certificate file. (This tuple is passed to the
:meth:`smtplib.SMTP.starttls` method.)
+ A timeout can be specified for communication with the SMTP server using the
+ *timeout* argument.
+
+ .. versionadded:: 3.3
+ The *timeout* argument was added.
+
.. method:: emit(record)
Formats the record and sends it to the specified addressees.
@@ -744,7 +750,7 @@
:class:`BufferingHandler`, which is an abstract class. This buffers logging
records in memory. Whenever each record is added to the buffer, a check is made
by calling :meth:`shouldFlush` to see if the buffer should be flushed. If it
-should, then :meth:`flush` is expected to do the needful.
+should, then :meth:`flush` is expected to do the flushing.
.. class:: BufferingHandler(capacity)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list