multi-python-logger


Namemulti-python-logger JSON
Version 3.0.0 PyPI version JSON
download
home_pageNone
SummaryApplication to provide different logging mechanisms
upload_time2024-07-31 02:40:18
maintainerNone
docs_urlNone
authorMohamed Naji Aboo
requires_pythonNone
licenseNone
keywords python logger cloud_logger aws_cloudwatch_logger
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">Multi Python Logger</h1>
<p align="center"><i>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..</i></p>
<div align="center">
  <a href="https://github.com/NajiAboo/multi_python_logger/stargazers"><img src="https://img.shields.io/github/stars/NajiAboo/multi_python_logger" alt="Stars Badge"/></a>
<a href="https://github.com/NajiAboo/multi_python_logger/network/members"><img src="https://img.shields.io/github/forks/NajiAboo/multi_python_logger" alt="Forks Badge"/></a>
<a href="https://github.com/NajiAboo/multi_python_logger/pulls"><img src="https://img.shields.io/github/issues-pr/NajiAboo/multi_python_logger" alt="Pull Requests Badge"/></a>
<a href="https://github.com/NajiAboo/multi_python_logger/issues"><img src="https://img.shields.io/github/issues/NajiAboo/multi_python_logger" alt="Issues Badge"/></a>
<a href="https://github.com/NajiAboo/multi_python_logger/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/NajiAboo/multi_python_logger?color=2b9348"></a>
<a href="https://github.com/NajiAboo/multi_python_logger/blob/master/LICENSE"><img src="https://img.shields.io/github/license/NajiAboo/multi_python_logger?color=2b9348" alt="License Badge"/></a>
</div>

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

  
  ```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "multi-python-logger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python logger cloud_logger, aws_cloudwatch_logger",
    "author": "Mohamed Naji Aboo",
    "author_email": "aboonaji@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/eb/cd/22609c5357b158774a9e02a0c9c881e50099276796020b39d15735d91048/multi_python_logger-3.0.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">Multi Python Logger</h1>\n<p align=\"center\"><i>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..</i></p>\n<div align=\"center\">\n  <a href=\"https://github.com/NajiAboo/multi_python_logger/stargazers\"><img src=\"https://img.shields.io/github/stars/NajiAboo/multi_python_logger\" alt=\"Stars Badge\"/></a>\n<a href=\"https://github.com/NajiAboo/multi_python_logger/network/members\"><img src=\"https://img.shields.io/github/forks/NajiAboo/multi_python_logger\" alt=\"Forks Badge\"/></a>\n<a href=\"https://github.com/NajiAboo/multi_python_logger/pulls\"><img src=\"https://img.shields.io/github/issues-pr/NajiAboo/multi_python_logger\" alt=\"Pull Requests Badge\"/></a>\n<a href=\"https://github.com/NajiAboo/multi_python_logger/issues\"><img src=\"https://img.shields.io/github/issues/NajiAboo/multi_python_logger\" alt=\"Issues Badge\"/></a>\n<a href=\"https://github.com/NajiAboo/multi_python_logger/graphs/contributors\"><img alt=\"GitHub contributors\" src=\"https://img.shields.io/github/contributors/NajiAboo/multi_python_logger?color=2b9348\"></a>\n<a href=\"https://github.com/NajiAboo/multi_python_logger/blob/master/LICENSE\"><img src=\"https://img.shields.io/github/license/NajiAboo/multi_python_logger?color=2b9348\" alt=\"License Badge\"/></a>\n</div>\n\n## Installation\n\n### Install with pip\n\nInstall `multi_python_logger`:\n\n```\npip install multi_python_logger\n```\n\n### Sample code\n\n```\nfrom multi_python_logger import logger\nlogger.log(\"info\", msg=\"This is the sample message\", module_name=\"app\",error_code=\"1001\" )\n```\n\n## Logger Options\n\n### Local File Logging\n  Automatically logs messages to a local file for easy access and review.\n  To set the file logger set the environment variable \n  ```\n  LOGGING_TYPE = \"file\"\n  ```\n\n### AWS CloudWatch Logging\n  Send your logs directly to AWS CloudWatch, enabling centralized log management and monitoring.\n\n  To set the Cloudwatch logging set the following environement variables\n\n  ```\n  LOGGING_TYPE = \"cloudwatch\"\n\n  CLOUDWATCH_LOG_GROUP = \"\"\n\n  CLOUDWATCH_STREAM_NAME = \"\"\n\n  AWS_REGION = \"\"\n\n  AWS_ACCESS_KEY = \"\"\n\n  AWS_SECRET_KEY = \"\"\n  ```\n\n\n### MongoDb Logging\n  Send your logs directly to MongoDB, enabling centralized log management and monitoring.\n\n  To set the MongoDB logging set the following environement variables\n\n  ```\n  LOGGING_TYPE = \"mongodb\"\n\n  MONGODB_URI = \"\" #default set as \"mongodb://localhost:27018\"\n\n  MONGODB_DB = \"\" #default set as logs\n\n  MONGODB_COLLECTION = \"\" #log_entries\n\n  \n  ```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Application to provide different logging mechanisms",
    "version": "3.0.0",
    "project_urls": null,
    "split_keywords": [
        "python logger cloud_logger",
        " aws_cloudwatch_logger"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebcd22609c5357b158774a9e02a0c9c881e50099276796020b39d15735d91048",
                "md5": "314d0746fc6f3ded97cb31557c708614",
                "sha256": "a7289514d3eec66be118d4613141095cd87b1d5ccdf10ca3466fb47c046c63e1"
            },
            "downloads": -1,
            "filename": "multi_python_logger-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "314d0746fc6f3ded97cb31557c708614",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5735,
            "upload_time": "2024-07-31T02:40:18",
            "upload_time_iso_8601": "2024-07-31T02:40:18.537180Z",
            "url": "https://files.pythonhosted.org/packages/eb/cd/22609c5357b158774a9e02a0c9c881e50099276796020b39d15735d91048/multi_python_logger-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-31 02:40:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "multi-python-logger"
}
        
Elapsed time: 0.29401s