m-logging-dev


Namem-logging-dev JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryMobio project SDK
upload_time2023-02-08 03:45:07
maintainer
docs_urlNone
authorMOBIO
requires_python>=3.8
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # m-logging là thư viện python để write log cho các module BackEnd-Mobio

#### Version:
Phiên bản hiện tại `1.0.0`

#### Cài đặt:
`pip3 install m-logging`

#### Sử dụng:
1. Example:

```
if __name__ == '__main__':
    def test():
        MobioLogging().info('app_test_lib_logging::test():info', sensitive=True, extra={"key1": "value1"})
        try:
            a = 1 / 0
            MobioLogging().info('__init__::test():a: %s' % a)
        except Exception as ex1:
            MobioLogging().error('app_test_lib_logging::test():error: %s' % ex1, sensitive=True)

        MobioLogging().debug('app_test_lib_logging::test():debug')
        MobioLogging().warning('app_test_lib_logging::test():warning', sensitive=False)

    test()
```


2. Sử dụng file custom config:
```
config_file_path = 'path/to/config/file'
MobioLogging().file_config(self, config_file_path)
```


3. Sử dụng custom filter:
```
class CustomizeFilterRecords():
    def filter(self, record):
        if record.key1 == 'value1':
            return False # no log
        return True

MobioLogging().logger.addFilter(CustomizeFilterRecords())
```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "m-logging-dev",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "MOBIO",
    "author_email": "contact@mobio.io",
    "download_url": "https://files.pythonhosted.org/packages/59/ac/d36ca615763ba4abb8d91138bf4ee8b81b9975bf16e9831a34fa26a6fd7c/m-logging-dev-1.0.0.tar.gz",
    "platform": null,
    "description": "# m-logging l\u00e0 th\u01b0 vi\u1ec7n python \u0111\u1ec3 write log cho c\u00e1c module BackEnd-Mobio\n\n#### Version:\nPhi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i `1.0.0`\n\n#### C\u00e0i \u0111\u1eb7t:\n`pip3 install m-logging`\n\n#### S\u1eed d\u1ee5ng:\n1. Example:\n\n```\nif __name__ == '__main__':\n    def test():\n        MobioLogging().info('app_test_lib_logging::test():info', sensitive=True, extra={\"key1\": \"value1\"})\n        try:\n            a = 1 / 0\n            MobioLogging().info('__init__::test():a: %s' % a)\n        except Exception as ex1:\n            MobioLogging().error('app_test_lib_logging::test():error: %s' % ex1, sensitive=True)\n\n        MobioLogging().debug('app_test_lib_logging::test():debug')\n        MobioLogging().warning('app_test_lib_logging::test():warning', sensitive=False)\n\n    test()\n```\n\n\n2. S\u1eed d\u1ee5ng file custom config:\n```\nconfig_file_path = 'path/to/config/file'\nMobioLogging().file_config(self, config_file_path)\n```\n\n\n3. S\u1eed d\u1ee5ng custom filter:\n```\nclass CustomizeFilterRecords():\n    def filter(self, record):\n        if record.key1 == 'value1':\n            return False # no log\n        return True\n\nMobioLogging().logger.addFilter(CustomizeFilterRecords())\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Mobio project SDK",
    "version": "1.0.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59acd36ca615763ba4abb8d91138bf4ee8b81b9975bf16e9831a34fa26a6fd7c",
                "md5": "1d41fb2d9d125a0ad507203ee79e5807",
                "sha256": "b1fb2e6bf32e545125606724476f95bb45ddeb65250bb6ed6848a61aaf8d3d0e"
            },
            "downloads": -1,
            "filename": "m-logging-dev-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1d41fb2d9d125a0ad507203ee79e5807",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3989,
            "upload_time": "2023-02-08T03:45:07",
            "upload_time_iso_8601": "2023-02-08T03:45:07.581961Z",
            "url": "https://files.pythonhosted.org/packages/59/ac/d36ca615763ba4abb8d91138bf4ee8b81b9975bf16e9831a34fa26a6fd7c/m-logging-dev-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-08 03:45:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "m-logging-dev"
}
        
Elapsed time: 0.06142s