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

logging_extended_handlers-0.1.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

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