changeset 2199:0c73398efeea

admin emails documentation
author Ana Balica <ana.balica@gmail.com>
date Mon, 23 Sep 2013 20:15:51 +0200
parents 2bc9a1b3bdbd
children 676c1259bcc9
files docs/admin/configure.rst docs/examples/config/logging/email
diffstat 2 files changed, 55 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/docs/admin/configure.rst	Mon Sep 23 20:12:17 2013 +0200
+++ b/docs/admin/configure.rst	Mon Sep 23 20:15:51 2013 +0200
@@ -1280,6 +1280,8 @@
 * might be useful together with SMBMount pseudo-authenticator
 
 
+.. _mail-configuration:
+
 Mail configuration
 ==================
 
@@ -1287,15 +1289,17 @@
 --------------
 Moin can optionally send E-Mail. Possible uses:
 
-* send out item change notifications.
+* send out item change notifications
 * enable users to reset forgotten passwords
+* inform admins about runtime exceptions
 
 You need to configure some settings before sending E-Mail can be supported::
 
     # the "from:" address [Unicode]
     mail_from = u"wiki <wiki@example.org>"
 
-    # a) using an SMTP server, e.g. "mail.provider.com" (None to disable mail)
+    # a) using an SMTP server, e.g. "mail.provider.com" with optional `:port`
+    appendix, which defaults to 25 (set None to disable mail)
     mail_smarthost = "smtp.example.org"
 
     # if you need to use SMTP AUTH at your mail_smarthost:
@@ -1310,6 +1314,19 @@
 
    describe more moin configuration
 
+Admin Traceback E-Mails
+-----------------------
+If you want to enable admins to receive Python tracebacks, you need to configure
+the following::
+
+    # list of admin emails
+    admin_emails = [u"admin <admin@example.org>"]
+
+    # send tracebacks to admins
+    email_tracebacks = True
+
+
+Please also check the logging configuration example in `docs/examples/config/logging/email`.
 
 User E-Mail Address Verification
 --------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/examples/config/logging/email	Mon Sep 23 20:15:51 2013 +0200
@@ -0,0 +1,36 @@
+[DEFAULT]
+# List of admin emails, if left blank will extract the list from wikiconfig ADMIN_EMAILS
+admins=[]
+
+# Email subject, if left blank will display the default subject: [Sitename][Loglevel] Log message
+subject=u""
+
+# Default loglevel, to adjust verbosity: DEBUG, INFO, WARNING, ERROR, CRITICAL
+loglevel=ERROR
+
+# Email loglevel
+emailloglevel=ERROR
+
+[loggers]
+keys=root
+
+[handlers]
+keys=email
+
+[formatters]
+keys=mail
+
+[logger_root]
+level=%(loglevel)s
+handlers=email
+
+[handler_email]
+class=MoinMoin.log.EmailHandler
+level=%(emailloglevel)s
+formatter=default
+args=(%(admins)s, %(subject)s)
+
+[formatter_mail]
+format=%(asctime)s %(levelname)s %(name)s:%(lineno)d %(message)s
+datefmt=
+class=logging.Formatter
\ No newline at end of file