使用教程
import kancylog as log
# 控制是否打印彩色日志,默认是True
# log.disablePrintColor()
# 使用默认的Logger实例
log.debug("debug log")
log.info("info log")
log.warn("warn log")
log.error("error log")
log.success("success log")
log.log("good log", "GOOD")
# 自定义Logger对象
logger = log.Logger(color=True, tag="demo", file="test_{date}.log")
logger.debug("debug log")
logger.info("info log")
logger.warn("warn log")
logger.error("error log")
logger.success("success log")
logger.log("good log", "GOOD")
1)文字效果
2021-11-27 01:17:56.316447 DEBUG 115872 <mainthread> - [log_tests.py::6] : debug log
2021-11-27 01:17:56.316447 INFO 115872 <mainthread> - [log_tests.py::7] : info log
2021-11-27 01:17:56.316447 WARN 115872 <mainthread> - [log_tests.py::8] : warn log
2021-11-27 01:17:56.316447 ERROR 115872 <mainthread> - [log_tests.py::9] : error log
2021-11-27 01:17:56.316447 OK 115872 <mainthread> - [log_tests.py::10] : success log
2021-11-27 01:17:56.316447 GOOD 115872 <mainthread> - [log_tests.py::11] : good log
2021-11-27 01:17:56.316447 DEBUG 115872 <mainthread> - [log_tests.py::16] (demo) : debug log
2021-11-27 01:17:56.316447 INFO 115872 <mainthread> - [log_tests.py::17] (demo) : info log
2021-11-27 01:17:56.316447 WARN 115872 <mainthread> - [log_tests.py::18] (demo) : warn log
2021-11-27 01:17:56.316447 ERROR 115872 <mainthread> - [log_tests.py::19] (demo) : error log
2021-11-27 01:17:56.316447 OK 115872 <mainthread> - [log_tests.py::20] (demo) : success log
2021-11-27 01:17:56.316447 GOOD 115872 <mainthread> - [log_tests.py::21] (demo) : good log
2)图片效果
Metadata
Release files for kancylog 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kancylog-0.0.5.tar.gz | 5.7 kB | Without provenance | Details for kancylog-0.0.5.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kancylog-0.0.5-py3.9.egg | Legacy Egg format | - | - | Details for kancylog-0.0.5-py3.9.egg |
| kancylog-0.0.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for kancylog-0.0.5-py2.py3-none-any.whl |
Total release size: 16.7 kB
Release files / kancylog-0.0.5.tar.gz
| Download URL | kancylog-0.0.5.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9006faa7dd4847d9a6f2f41440b42674586c29dc77d5027280bbc55a859d38d6
|
|
BLAKE2b-256 checksum How to use checksums |
1ef99994c1336f1652f716aa006470b4c76f53b0dff5a33bd8e5c4b7595f72d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / kancylog-0.0.5-py3.9.egg
| Download URL | kancylog-0.0.5-py3.9.egg |
|---|---|
| Size | 7.0 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
d1c8106dc6082e04947c003a54753cef6fd62da4c0a856a14fb2c1a1dfd0e75b
|
|
BLAKE2b-256 checksum How to use checksums |
b5b6ba17191b0a1f4694f70e6ade2b2f3c33cf290e93a6425691918d0991b608
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / kancylog-0.0.5-py2.py3-none-any.whl
| Download URL | kancylog-0.0.5-py2.py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d5d15cb03de9759767c72ba30c5e4bf12285b22ec27bd2435bc84da3c1e9d6b6
|
|
BLAKE2b-256 checksum How to use checksums |
e35fd2b33d2fa047faa8e4314c8921ea79c93e3427284062cdf1b7c3ffebce7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for kancylog 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.