Skip to main content

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..

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors License Badge

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 = ""

MongoDb Logging

Send your logs directly to MongoDB, enabling centralized log management and monitoring.

To set the MongoDB logging set the following environement variables

LOGGING_TYPE = "mongodb"

MONGODB_URI = "" #default set as "mongodb://localhost:27018"

MONGODB_DB = "" #default set as logs

MONGODB_COLLECTION = "" #log_entries


Project details


Download files

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

Source Distribution

multi_python_logger-3.0.0.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file multi_python_logger-3.0.0.tar.gz.

File metadata

  • Download URL: multi_python_logger-3.0.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for multi_python_logger-3.0.0.tar.gz
Algorithm Hash digest
SHA256 a7289514d3eec66be118d4613141095cd87b1d5ccdf10ca3466fb47c046c63e1
MD5 314d0746fc6f3ded97cb31557c708614
BLAKE2b-256 ebcd22609c5357b158774a9e02a0c9c881e50099276796020b39d15735d91048

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