Skip to main content

Extending logging.handlers

Project description

logging-extended-handlers

PyPI - Version PyPI - Python Version License: MIT


Table of Contents

About

This package contains the following loggers:

  • HTTPHandlerCustomHeader: Like logging.handlers.HTTPHandler but with full freedom of the HTTP header
  • BufferingSMTPHandler: Buffers the logs like logging.handlers.BufferingHandler and sends it via smtp

Similar projects with differen handlers:

Installation

pip install logging-extended-handlers

Usage

Eg.

logger = logging.getLogger()
logger.setLevel("DEBUG")
my_logger = MyLogger(...)
my_logger.setLevel("INFO")
my_formatter = logging.Formatter(
    fmt="%(asctime)s %(levelname)s by %(funcName)s: %(message)s",
    datefmt="%Y-%m-%d %H:%M:%S",
    style="%",
)
my_logger.setFormatter(my_formatter)
logger.addHandler(my_logger)

License

logging-extended-handlers is distributed under the terms of the MIT license.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file logging_extended_handlers-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for logging_extended_handlers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 013937a1b35621c867e85286172b0657f1438c2dbbf73075c69769d5c06f1348
MD5 1514fb7a3cb09c7ad57bf9bee4341d41
BLAKE2b-256 3290f5bf971f85bcfb7d52477b29bc502a7c41e82d69ebf5d4bb5335f0b6bdc5

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