Send log messages to sendinblue's transactional email service.
Project description
Description
This is a logging handler for Python's logging module to send log messages over sendinblue's transactional email service.
Installation
$ pip install sendinblue-logger
Usage
import sblue
import logging
import os
handler = sblue.LoggingHandler(
level=logging.ERROR,
api_key=os.getenv('SENDINBLUE_API_KEY'),
from_email='sender-email@domain.com',
to_email='recipient-email@domain.com',
)
logging.basicConfig(
filename='/home/user/project/project.log',
encoding='utf-8',
level=logging.DEBUG,
format='%(asctime)s - %(levelname)s: %(message)s',
handlers=(handler,)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sendinblue_logger-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f6d0f6c122c4a01c483945935e0aebe5ca8b55cdad502c94cbc09f6d0757c87 |
|
MD5 | 2f78ae02b02c64385452a94e6e3d13ba |
|
BLAKE2b-256 | ba1a6b2c3a2b2e765f2875e07386cf7f942c99b27714997afc184e64b32c9d8c |