Skip to main content

Generic utilities for the Python logging facility

Project description

python-logging-extra

Additional handlers for the Python standard logging facility.

JabberHandler

import logging
from loggingx import JabberHandler, Account

sender = Account(username = 'your-account@gmail.com',
                 password = 'your-password')

destination = 'target-account@gmail.com'

jabber_handler = JabberHandler(sender=sender, to=destination)

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.addHandler(jabber_handler)

logger.debug("debug message")

SMTP_SSLHandler

Including SSL support, so it is able to send mail with gmail.

import logging
from loggingx import SMTP_SSLHandler, Server, Account

sender = Account(username = 'your-account@gmail.com',
                 password = 'your-password')

destination = 'target-account@gmail.com'

gmail_smtp = Server(hostname='smtp.gmail.com',
                    port=587, ssl=True)

smtp_handler = SMTP_SSLHandler(server  = gmail_smtp,
                               sender  = sender,
                               toaddrs = [destination],
                               subject = 'SSL SMTP notification')

logger = logging.getLogger()
logger.addHandler(smtp_handler)

logger.debug("debug message")

Notify handler

Debian

python-logging-extra is available as official Debian package.

Source repository

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-logging-extra-0.20130515.2.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file python-logging-extra-0.20130515.2.tar.gz.

File metadata

File hashes

Hashes for python-logging-extra-0.20130515.2.tar.gz
Algorithm Hash digest
SHA256 1c0e9e2932ddf3e04960322ed28a7c2cd3dab50ee3d99192bf8ac76180d78ceb
MD5 5d5bd82126478e68139ca034bfb60cda
BLAKE2b-256 1be6869158f307537d87c37bd2b4be977c10638c3fce525caa9f85267081d979

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page