summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-26 16:17:39 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-26 16:17:39 (GMT)
commit38a12af36a2ffb67796eadfbe1d83497a859b775 (patch)
tree84ddf1c328dfc7ce6cb8b83c6358ec369d7ee90f /Doc
parent16ecb9dea016434cfe613e9fe96b793aecc83fc8 (diff)
parent8ece80faae3bec86628aa4176a751265ecb2f2a4 (diff)
downloadcpython-38a12af36a2ffb67796eadfbe1d83497a859b775.zip
cpython-38a12af36a2ffb67796eadfbe1d83497a859b775.tar.gz
cpython-38a12af36a2ffb67796eadfbe1d83497a859b775.tar.bz2
Updated handler documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.handlers.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 51e476b..537b8c7 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -704,7 +704,7 @@ The :class:`SMTPHandler` class, located in the :mod:`logging.handlers` module,
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 @@ supports sending logging messages to an email address via SMTP.
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 @@ event of a certain severity or greater is seen.
: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)