spetslogging


Namespetslogging JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/DiNAMitiON/SpetsLoging
SummarySpetsLogging is a simple way to log in the console and in a file.
upload_time2023-11-04 14:24:54
maintainer
docs_urlNone
authorDmitry Goncharov (_DiNAMitiON_)
requires_python>=3.7
license
keywords logging write to file
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SpetsLoging
=====

SpetsLogging is a simple way to log in the console and in a file.


Installing
----------

Install and update using [pip](https://pip.pypa.io/en/stable/getting-started/):
```text
$ pip install spetsloging
```


A Simple Example
----------------


main.py
```python
import spetslogging
import time
log = spetslogging.logger.Log()
log.settings(
    Format='%d%.%m%.%y% %h%:%m%:%s% %stat% >> %message%',
    Colors={
        'INFO': 'CYAN',
        'DEBUG': 'YELLOW',
        'WARNING': 'LIGHTRED'
    }
)
for i in range(5):
    log.info(i, file='test.log')
    log.error('Test', file='test.log')
    time.sleep(0.5)

log.debug('Program completed')
```

Output
```text
31.10.2023 12:10:41 [INFO] >> 0
31.10.2023 12:10:41 [ERROR] >> Test
31.10.2023 12:10:42 [INFO] >> 1
31.10.2023 12:10:42 [ERROR] >> Test
31.10.2023 12:10:42 [INFO] >> 2
31.10.2023 12:10:42 [ERROR] >> Test
31.10.2023 12:10:43 [INFO] >> 3
31.10.2023 12:10:43 [ERROR] >> Test
31.10.2023 12:10:43 [INFO] >> 4
31.10.2023 12:10:43 [ERROR] >> Test
31.10.2023 12:10:44 [DEBUG] >> Program completed
```


test.log
```log
31.10.2023 12:10:41 [INFO] >> 0
31.10.2023 12:10:41 [ERROR] >> Test
31.10.2023 12:10:42 [INFO] >> 1
31.10.2023 12:10:42 [ERROR] >> Test
31.10.2023 12:10:42 [INFO] >> 2
31.10.2023 12:10:42 [ERROR] >> Test
31.10.2023 12:10:43 [INFO] >> 3
31.10.2023 12:10:43 [ERROR] >> Test
31.10.2023 12:10:43 [INFO] >> 4
31.10.2023 12:10:43 [ERROR] >> Test
```


Donate
------

To support the development of the library, support its author.
https://donationalerts.com/r/dinamition


Links
-----

-   PyPI Releases: https://pypi.org/project/SpetsLoging/
-   Source Code: https://github.com/DiNAMitiON/SpetsLoging/
-   Issue Tracker: https://github.com/DiNAMitiON/SpetsLogging/issues/
-   SpetsDevelopers | Support: https://discord.gg/z5hEVQ5agn/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DiNAMitiON/SpetsLoging",
    "name": "spetslogging",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "Logging,write to file",
    "author": "Dmitry Goncharov (_DiNAMitiON_)",
    "author_email": "dinamition42@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/19/4b/58b87e89c918d68631767e414fc71baedd81ba72799e41239fa08544568e/spetslogging-0.0.1.tar.gz",
    "platform": null,
    "description": "SpetsLoging\r\n=====\r\n\r\nSpetsLogging is a simple way to log in the console and in a file.\r\n\r\n\r\nInstalling\r\n----------\r\n\r\nInstall and update using [pip](https://pip.pypa.io/en/stable/getting-started/):\r\n```text\r\n$ pip install spetsloging\r\n```\r\n\r\n\r\nA Simple Example\r\n----------------\r\n\r\n\r\nmain.py\r\n```python\r\nimport spetslogging\r\nimport time\r\nlog = spetslogging.logger.Log()\r\nlog.settings(\r\n    Format='%d%.%m%.%y% %h%:%m%:%s% %stat% >> %message%',\r\n    Colors={\r\n        'INFO': 'CYAN',\r\n        'DEBUG': 'YELLOW',\r\n        'WARNING': 'LIGHTRED'\r\n    }\r\n)\r\nfor i in range(5):\r\n    log.info(i, file='test.log')\r\n    log.error('Test', file='test.log')\r\n    time.sleep(0.5)\r\n\r\nlog.debug('Program completed')\r\n```\r\n\r\nOutput\r\n```text\r\n31.10.2023 12:10:41 [INFO] >> 0\r\n31.10.2023 12:10:41 [ERROR] >> Test\r\n31.10.2023 12:10:42 [INFO] >> 1\r\n31.10.2023 12:10:42 [ERROR] >> Test\r\n31.10.2023 12:10:42 [INFO] >> 2\r\n31.10.2023 12:10:42 [ERROR] >> Test\r\n31.10.2023 12:10:43 [INFO] >> 3\r\n31.10.2023 12:10:43 [ERROR] >> Test\r\n31.10.2023 12:10:43 [INFO] >> 4\r\n31.10.2023 12:10:43 [ERROR] >> Test\r\n31.10.2023 12:10:44 [DEBUG] >> Program completed\r\n```\r\n\r\n\r\ntest.log\r\n```log\r\n31.10.2023 12:10:41 [INFO] >> 0\r\n31.10.2023 12:10:41 [ERROR] >> Test\r\n31.10.2023 12:10:42 [INFO] >> 1\r\n31.10.2023 12:10:42 [ERROR] >> Test\r\n31.10.2023 12:10:42 [INFO] >> 2\r\n31.10.2023 12:10:42 [ERROR] >> Test\r\n31.10.2023 12:10:43 [INFO] >> 3\r\n31.10.2023 12:10:43 [ERROR] >> Test\r\n31.10.2023 12:10:43 [INFO] >> 4\r\n31.10.2023 12:10:43 [ERROR] >> Test\r\n```\r\n\r\n\r\nDonate\r\n------\r\n\r\nTo support the development of the library, support its author.\r\nhttps://donationalerts.com/r/dinamition\r\n\r\n\r\nLinks\r\n-----\r\n\r\n-   PyPI Releases: https://pypi.org/project/SpetsLoging/\r\n-   Source Code: https://github.com/DiNAMitiON/SpetsLoging/\r\n-   Issue Tracker: https://github.com/DiNAMitiON/SpetsLogging/issues/\r\n-   SpetsDevelopers | Support: https://discord.gg/z5hEVQ5agn/\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "SpetsLogging is a simple way to log in the console and in a file.",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/DiNAMitiON/SpetsLoging",
        "Source Code": "https://github.com/DiNAMitiON/SpetsLoging/",
        "SpetsDevelopers | Support": "https://discord.gg/z5hEVQ5agn/"
    },
    "split_keywords": [
        "logging",
        "write to file"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c05fb0f95d01e231c531a23bdc42a472a4422e5b177617cd95666e2c900fb181",
                "md5": "c6538726318b57ab6084467f2be59ef0",
                "sha256": "10df6f4ea815cb504e1dc1e1d5cd2ae109146bfef0dc79c9c5c91c4823327456"
            },
            "downloads": -1,
            "filename": "spetslogging-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c6538726318b57ab6084467f2be59ef0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4311,
            "upload_time": "2023-11-04T14:24:52",
            "upload_time_iso_8601": "2023-11-04T14:24:52.326531Z",
            "url": "https://files.pythonhosted.org/packages/c0/5f/b0f95d01e231c531a23bdc42a472a4422e5b177617cd95666e2c900fb181/spetslogging-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "194b58b87e89c918d68631767e414fc71baedd81ba72799e41239fa08544568e",
                "md5": "63468c984edf25c9c247ba7236935082",
                "sha256": "92cddf272ba83414640f6b924cd37fbb656159a02689b22d5f8fe0713530020a"
            },
            "downloads": -1,
            "filename": "spetslogging-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "63468c984edf25c9c247ba7236935082",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3894,
            "upload_time": "2023-11-04T14:24:54",
            "upload_time_iso_8601": "2023-11-04T14:24:54.019988Z",
            "url": "https://files.pythonhosted.org/packages/19/4b/58b87e89c918d68631767e414fc71baedd81ba72799e41239fa08544568e/spetslogging-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-04 14:24:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DiNAMitiON",
    "github_project": "SpetsLoging",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spetslogging"
}
        
Elapsed time: 0.16181s