ddcLogs


NameddcLogs JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/ddc/ddcLogs
SummaryCustom log with rotations
upload_time2024-06-10 17:34:24
maintainerDaniel Costa
docs_urlNone
authorDaniel Costa
requires_python<4.0,>=3.10
licenseMIT
keywords python3 log log-utils ddclogs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Few Utility Functions

[![License](https://img.shields.io/github/license/ddc/ddcLogs.svg?style=plastic)](https://github.com/ddc/ddcLogs/blob/master/LICENSE)
[![Python](https://img.shields.io/badge/Python-3.10+-blue.svg?style=plastic)](https://www.python.org)
[![PyPi](https://img.shields.io/pypi/v/ddcLogs.svg?style=plastic)](https://pypi.python.org/pypi/ddcLogs)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A//actions-badge.atrox.dev/ddc/ddcLogs/badge?ref=main&style=plastic&label=build&logo=none)](https://actions-badge.atrox.dev/ddc/ddcLogs/goto?ref=main)


# Install
```shell
pip install ddcLogs
```


# Logs
+ Setup Logging
    + Logs will rotate based on `when` variable to a `.tar.gz` file, defaults to `midnight`
    + Logs will be deleted based on the `days_to_keep` variable, defaults to 7
    + Current 'when' events supported:
        + S - Seconds
        + M - Minutes
        + H - Hours
        + D - Days
        + midnight - roll over at midnight
        + W{0-6} - roll over on a certain day; 0 - Monday
```python
from ddcLogs import TimedRotatingLog
log = TimedRotatingLog(
    level = "info",
    directory = "logs",
    filename = "app.log",
    encoding = "UTF-8",
    days_to_keep = 7,
    when = "midnight",
    utc = True
)
log.init()
```


# Source Code
### Build
```shell
poetry build
```


### Run Tests
```shell
poe test
```


### Get Coverage Report
```shell
poe coverage
```


# License
Released under the [MIT License](LICENSE)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ddc/ddcLogs",
    "name": "ddcLogs",
    "maintainer": "Daniel Costa",
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "python3, log, log-utils, ddcLogs",
    "author": "Daniel Costa",
    "author_email": "danieldcsta@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a4/a0/af44452ccebad49eebb7497e21cd8bef4c86c6d92650c11a7af9a5f45f2e/ddclogs-1.0.1.tar.gz",
    "platform": null,
    "description": "# Few Utility Functions\n\n[![License](https://img.shields.io/github/license/ddc/ddcLogs.svg?style=plastic)](https://github.com/ddc/ddcLogs/blob/master/LICENSE)\n[![Python](https://img.shields.io/badge/Python-3.10+-blue.svg?style=plastic)](https://www.python.org)\n[![PyPi](https://img.shields.io/pypi/v/ddcLogs.svg?style=plastic)](https://pypi.python.org/pypi/ddcLogs)\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A//actions-badge.atrox.dev/ddc/ddcLogs/badge?ref=main&style=plastic&label=build&logo=none)](https://actions-badge.atrox.dev/ddc/ddcLogs/goto?ref=main)\n\n\n# Install\n```shell\npip install ddcLogs\n```\n\n\n# Logs\n+ Setup Logging\n    + Logs will rotate based on `when` variable to a `.tar.gz` file, defaults to `midnight`\n    + Logs will be deleted based on the `days_to_keep` variable, defaults to 7\n    + Current 'when' events supported:\n        + S - Seconds\n        + M - Minutes\n        + H - Hours\n        + D - Days\n        + midnight - roll over at midnight\n        + W{0-6} - roll over on a certain day; 0 - Monday\n```python\nfrom ddcLogs import TimedRotatingLog\nlog = TimedRotatingLog(\n    level = \"info\",\n    directory = \"logs\",\n    filename = \"app.log\",\n    encoding = \"UTF-8\",\n    days_to_keep = 7,\n    when = \"midnight\",\n    utc = True\n)\nlog.init()\n```\n\n\n# Source Code\n### Build\n```shell\npoetry build\n```\n\n\n### Run Tests\n```shell\npoe test\n```\n\n\n### Get Coverage Report\n```shell\npoe coverage\n```\n\n\n# License\nReleased under the [MIT License](LICENSE)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Custom log with rotations",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/ddc/ddcLogs",
        "Repository": "https://github.com/ddc/ddcLogs"
    },
    "split_keywords": [
        "python3",
        " log",
        " log-utils",
        " ddclogs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74a12d2650a56643ec160fbcae8879f3632c9eac358d25c28f7fc20c6b5cc493",
                "md5": "7098016453cba509e01e13e0b04273c7",
                "sha256": "016e36227b306e4051db4b1269d36d7b5de8f3f6aaec74fb33e51f9b24dd60e4"
            },
            "downloads": -1,
            "filename": "ddclogs-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7098016453cba509e01e13e0b04273c7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 7053,
            "upload_time": "2024-06-10T17:34:23",
            "upload_time_iso_8601": "2024-06-10T17:34:23.314110Z",
            "url": "https://files.pythonhosted.org/packages/74/a1/2d2650a56643ec160fbcae8879f3632c9eac358d25c28f7fc20c6b5cc493/ddclogs-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4a0af44452ccebad49eebb7497e21cd8bef4c86c6d92650c11a7af9a5f45f2e",
                "md5": "a09124a1bab13827bd439c494fc4b048",
                "sha256": "c702bf8e088a43cac57815a2ce13118c5aadf95efb499f53f70e11db04670924"
            },
            "downloads": -1,
            "filename": "ddclogs-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a09124a1bab13827bd439c494fc4b048",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5557,
            "upload_time": "2024-06-10T17:34:24",
            "upload_time_iso_8601": "2024-06-10T17:34:24.312364Z",
            "url": "https://files.pythonhosted.org/packages/a4/a0/af44452ccebad49eebb7497e21cd8bef4c86c6d92650c11a7af9a5f45f2e/ddclogs-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-10 17:34:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ddc",
    "github_project": "ddcLogs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ddclogs"
}
        
Elapsed time: 0.26323s