一个开箱即用的 log 解决方案
Project description
XPyLogger
By 这里是小邓
介绍
XPyLog 是提供了一个开箱即用的日志库,较好的解决了Python 自带 logging 库使用繁琐,函数玄学的问题,支持 rich 库彩色输出。
依赖
- Python (3.9+)
- Rich
编译步骤
GIT
- 克隆 XLOGGER
- 放入程序文件夹
- 安装
rich:
pip install rich
from XPyLogger import *
PIP(推荐)
pip install XPyLogger
Demo
import XPyLogger as log
log.log("Hello world!")
log.close()
函数介绍
XPyLogger.log(msg, level = INFO, sender = SENDER_MAIN)
输出一条日志
- msg:log信息
- level:日志等级
- sender:发送者
XPyLogger.close()
关闭日志本地记录文件
XPyLogger.INFO
日志等级-信息
XPyLogger.WARN
日至等级-警告
XPyLogger.ERR
日志等级-错误
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
XPyLogger-1.1.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file XPyLogger-1.1.tar.gz.
File metadata
- Download URL: XPyLogger-1.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.1 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
844d20777028ba3d43b443df6b90358947920a0270334423d1d574889a1af3ec
|
|
| MD5 |
81cc7adf851cbef9c38b483ef1790881
|
|
| BLAKE2b-256 |
f9a99169ae420750d36b4e8d2760e28671697b4492f183c11453cc272c2ca522
|
File details
Details for the file XPyLogger-1.1-py3-none-any.whl.
File metadata
- Download URL: XPyLogger-1.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.1 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c45ed9d517b825e30d63331b2d2dd293661860609e77c0c94a4ef0429ccbb8e4
|
|
| MD5 |
ca2f2cf4e760b17342e2147f001001b7
|
|
| BLAKE2b-256 |
b1c0a011e90d0ff0346b4548ac09653451725e3138236b1a78cf5cd97f04633c
|