Skip to main content

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


Download files

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

Source Distribution

sendinblue-logger-1.0.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sendinblue_logger-1.0.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file sendinblue-logger-1.0.0.tar.gz.

File metadata

  • Download URL: sendinblue-logger-1.0.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.13 Darwin/19.6.0

File hashes

Hashes for sendinblue-logger-1.0.0.tar.gz
Algorithm Hash digest
SHA256 de9a64a5a7ff4f6bdbebb4a1644f1f80551e44bcc51c39281371c866f3bfd2b7
MD5 7ffceeac976429dee317e037b26efa3a
BLAKE2b-256 5fbe16a706984ce27aeefe798914b700b726f134adf2b9a58d0a9ef646fc8804

See more details on using hashes here.

File details

Details for the file sendinblue_logger-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sendinblue_logger-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.13 Darwin/19.6.0

File hashes

Hashes for sendinblue_logger-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f6d0f6c122c4a01c483945935e0aebe5ca8b55cdad502c94cbc09f6d0757c87
MD5 2f78ae02b02c64385452a94e6e3d13ba
BLAKE2b-256 ba1a6b2c3a2b2e765f2875e07386cf7f942c99b27714997afc184e64b32c9d8c

See more details on using hashes here.

Supported by

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