Skip to main content

Extending logging.handlers

Project description

logging-extended-handlers

Version PyPI - Version PyPI - Python Version
Project GitHub License PyPI - Status PyPI - Format PyPI - Implementation
CI GitHub Actions Workflow Status
Code PyPI - Types Checked with mypy Linting: Ruff Code style: black

Extending logging.handlers

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

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

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

logging_extended_handlers-0.2.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for logging_extended_handlers-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f715bcd01586f0c30c461ccee3d3073444b6e85e2b257378964ba1e1eec6f29
MD5 5a4ec86551693cccab356fbe932e5b05
BLAKE2b-256 b044bf2f5a32503506172c4ca2290656b671d0455b701625e9a643cffb961b7b

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