Skip to main content

简单的控制台彩色日志工具。

Project description

使用教程

import kancylog as log

# 控制是否打印彩色日志,默认是True
# log.print_color = False

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")

1)文字效果

2021-11-26 23:23:44.006274 DEBUG 112828 <mainthread> - [log_tests.py::3] : debug log
2021-11-26 23:23:44.006274  INFO 112828 <mainthread> - [log_tests.py::4] : info log
2021-11-26 23:23:44.006274  WARN 112828 <mainthread> - [log_tests.py::5] : warn log
2021-11-26 23:23:44.006274 ERROR 112828 <mainthread> - [log_tests.py::6] : error log
2021-11-26 23:23:44.006274    OK 112828 <mainthread> - [log_tests.py::7] : success log
2021-11-26 23:23:44.006274  GOOD 112828 <mainthread> - [log_tests.py::8] : success log

2)图片效果

img.png

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

kancylog-0.0.2.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distributions

kancylog-0.0.2-py3.9.egg (4.6 kB view hashes)

Uploaded Source

kancylog-0.0.2-py2.py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page