Application to provide different logging mechanisms
Project description
Multi Python Logger
The Multi Python Logger is a versatile logging utility designed to simplify and enhance the logging process in Python applications. It supports logging to local files and integrates seamlessly with AWS CloudWatch, providing a unified interface for all your logging needs. Whether you're developing a small script or a large-scale application, this logger ensures your logs are easily accessible and well-organized..
Installation
Install with pip
Install multi_python_logger
:
pip install multi_python_logger
Sample code
from multi_python_logger import logger
logger.log("info", msg="This is the sample message", module_name="app",error_code="1001" )
Logger Options
Local File Logging
Automatically logs messages to a local file for easy access and review. To set the file logger set the environment variable
LOGGING_TYPE = "file"
AWS CloudWatch Logging
Send your logs directly to AWS CloudWatch, enabling centralized log management and monitoring.
To set the Cloudwatch logging set the following environement variables
LOGGING_TYPE = "cloudwatch"
CLOUDWATCH_LOG_GROUP = ""
CLOUDWATCH_STREAM_NAME = ""
AWS_REGION = ""
AWS_ACCESS_KEY = ""
AWS_SECRET_KEY = ""
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 Distribution
Hashes for multi_python_logger-2.1.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fe1f478d5db7b5be0f8ac569c9008eeb49c3b1f1005ae03899d8708031eb3ee |
|
MD5 | 24cc3cd01433fd63334d54ffcbcddfcb |
|
BLAKE2b-256 | 7e18e16809fcc30dd9c0258ec52c3d1dcb7bba8187c80bacdfd3b7929cb7b026 |