Extending logging.handlers
Project description
logging-extended-handlers
Table of Contents
About
This package contains the following loggers:
HTTPHandlerCustomHeader
: Likelogging.handlers.HTTPHandler
but with full freedom of the HTTP headerBufferingSMTPHandler
: Buffers the logs likelogging.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
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 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
- Download URL: logging_extended_handlers-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 013937a1b35621c867e85286172b0657f1438c2dbbf73075c69769d5c06f1348 |
|
MD5 | 1514fb7a3cb09c7ad57bf9bee4341d41 |
|
BLAKE2b-256 | 3290f5bf971f85bcfb7d52477b29bc502a7c41e82d69ebf5d4bb5335f0b6bdc5 |