A helper module for logging.
Project description
LLoghelper
1.使用:
pip install LLoghelper
2.导入:
from LLoghelper.log_helper import log, logger
3.控制日志log, print 是否可以打印 print=false恢复原样
logger.set_log_enable(True, True)
说明:
''' 日志辅助类
Just:
pip install LLoghelper
from LLoghelper.log_helper import log, logger
支持log.info, print 等方法提供日志输出、格式设置、颜色设置等功能
调用方法:
log.info("This is a test.")
log.warning("This is a warning.")
log.error("This is an error.")
log.critical("This is a critical error.")
log.debug("This is a debug message.")
替换原生的 print 函数, 并支持颜色输出:
print("This is a test.")
print("This is a critical test.", log_level=logger.CRITICAL)
print("This is a warning test.", log_level=logger.WARNING)
print("This is an error test.", log_level=logger.ERROR)
print("This is a debug test.", log_level=logger.DEBUG)
print("This is a info test.", log_level=logger.INFO)
主要功能:
1. 日志输出到控制台和文件
2. 日志格式设置:simple, standard, simple_color, verbose, debug
3. 日志颜色设置:red, green, yellow, blue, magenta, cyan, reset
4. 日志级别设置:DEBUG, INFO, WARNING, ERROR, CRITICAL, NOTSET
5. 日志打印控制:可以控制日志是否可以打印到控制台和文件
'''
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
lloghelper-0.2.0.tar.gz
(9.2 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 lloghelper-0.2.0.tar.gz.
File metadata
- Download URL: lloghelper-0.2.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
591b60b089fb9f8d83038241c21da4708f4aa2c07ff66806a5da98cf25b1106d
|
|
| MD5 |
d4df9c330dd536f171e9b756e25c196d
|
|
| BLAKE2b-256 |
61d97787404e6f01a18b22c31472e9c988521c9ea84829201e96a2365ef17d3a
|
File details
Details for the file LLoghelper-0.2.0-py3-none-any.whl.
File metadata
- Download URL: LLoghelper-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4203044af5dc8b0101c18ac5934f2312ddbc6a35ba718b430bfa58ec7357c500
|
|
| MD5 |
4803700626b095e96edce9f851c2835d
|
|
| BLAKE2b-256 |
56bbb705a9f14b6fb118464507967b899de83150fbde460d112902767ca9a4f7
|