## 创作背景
> 每个项目都要配置一次日志,繁琐,故自定义了一个库
## 功能
- 将每一个级别的日志分别写入。相较于大杂烩,层次更清晰
- 开放日志实例名的定制
- 开放日志目录定制
- 更多扩展
## 安装
### 方式一: python
```
python3 setup.py install
```
### 方式二: pip
```
pip3 install loggingA
```
## 使用
```python
from loggingA.logger import LoggerA
# Example usage
logger = LoggerA(level=logging.DEBUG, log_file="example.log")
logger.debug("This is a debug message")
logger.info("This is an info message")
logger.warning("This is a warning message")
logger.error("This is an error message")
logger.critical("This is a critical message")
# Example of logging within a function
example_function(logger)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/al6nlee/loggingA",
"name": "loggingA",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "alan",
"author_email": "al6nlee@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1a/b6/539cbb8c8f17ec48be34885affa72bb7950d288f7ce145e0e692e063a8e4/logginga-0.0.6.tar.gz",
"platform": null,
"description": "## \u521b\u4f5c\u80cc\u666f\n\n> \u6bcf\u4e2a\u9879\u76ee\u90fd\u8981\u914d\u7f6e\u4e00\u6b21\u65e5\u5fd7\uff0c\u7e41\u7410\uff0c\u6545\u81ea\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5e93\n\n## \u529f\u80fd\n\n- \u5c06\u6bcf\u4e00\u4e2a\u7ea7\u522b\u7684\u65e5\u5fd7\u5206\u522b\u5199\u5165\u3002\u76f8\u8f83\u4e8e\u5927\u6742\u70e9\uff0c\u5c42\u6b21\u66f4\u6e05\u6670\n- \u5f00\u653e\u65e5\u5fd7\u5b9e\u4f8b\u540d\u7684\u5b9a\u5236\n- \u5f00\u653e\u65e5\u5fd7\u76ee\u5f55\u5b9a\u5236\n- \u66f4\u591a\u6269\u5c55\n\n## \u5b89\u88c5\n\n### \u65b9\u5f0f\u4e00\uff1a python\n\n```\npython3 setup.py install\n```\n\n### \u65b9\u5f0f\u4e8c\uff1a pip\n\n```\npip3 install loggingA\n```\n\n## \u4f7f\u7528\n\n```python\nfrom loggingA.logger import LoggerA\n\n\n# Example usage\nlogger = LoggerA(level=logging.DEBUG, log_file=\"example.log\")\nlogger.debug(\"This is a debug message\")\nlogger.info(\"This is an info message\")\nlogger.warning(\"This is a warning message\")\nlogger.error(\"This is an error message\")\nlogger.critical(\"This is a critical message\")\n\n# Example of logging within a function\nexample_function(logger)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u81ea\u5b9a\u4e49\u65e5\u5fd7\u6a21\u5757",
"version": "0.0.6",
"project_urls": {
"Homepage": "https://github.com/al6nlee/loggingA"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b16673bf2e1164f03d5dc6eb83167b9fadf70d71128685dc69f8aed93d1c2962",
"md5": "da98487c119c121fed7b6e36829b996b",
"sha256": "ac9d792352e4b40d7bb14d80f53c794cc3979225cec198762d9eab276ac1bc53"
},
"downloads": -1,
"filename": "loggingA-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "da98487c119c121fed7b6e36829b996b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3664,
"upload_time": "2024-06-10T12:37:24",
"upload_time_iso_8601": "2024-06-10T12:37:24.501155Z",
"url": "https://files.pythonhosted.org/packages/b1/66/73bf2e1164f03d5dc6eb83167b9fadf70d71128685dc69f8aed93d1c2962/loggingA-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1ab6539cbb8c8f17ec48be34885affa72bb7950d288f7ce145e0e692e063a8e4",
"md5": "5993e31eb24c44a4eb973e1214586514",
"sha256": "468de3ad42220481b04d938791bf4fbf6d87340b41a101d270af10389ab26b11"
},
"downloads": -1,
"filename": "logginga-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "5993e31eb24c44a4eb973e1214586514",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4874,
"upload_time": "2024-06-10T12:37:26",
"upload_time_iso_8601": "2024-06-10T12:37:26.424038Z",
"url": "https://files.pythonhosted.org/packages/1a/b6/539cbb8c8f17ec48be34885affa72bb7950d288f7ce145e0e692e063a8e4/logginga-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-10 12:37:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "al6nlee",
"github_project": "loggingA",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "logginga"
}