一些常用的通用的工具, 比如日志记录工具
Project description
yucctools
常用的工具分享。可以方便的调用本工具去记录日志等。
安装
方法一:直接使用pip安装
pip install yucctools
方法二:国内pip有时较慢,可以指定使用清华源安装
pip install yucctools -i https://pypi.tuna.tsinghua.edu.cn/simple
使用示例
日志工具
可以方便的去初始化记录日志,并记录日志,样例:
# 导入包
import yucctools as yt
# 初始化logger实例
logger = yt.logger(filepath='test.log')
# 记录信息,只要这么调用就可以使用了
# 记录一条debug级别的日志
logger.info('this is a debug levle log.')
# 记录一条info级别的日志
logger.info('this is a info level log.')
# 记录一条warning级别的日志记录
logger.warning('this is a warning level log.')
# 记录一条error级别的日志记录
logger.error('this is a error level log.')
# 记录一条critical级别的日志记录
logger.critical('this is a critical level log.')
附录
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yucctools-0.1.4.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for yucctools-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e11fdf08a708ba05a94e27abfd05df4e3ee000a799a5e89fa5ba843c38a140d2 |
|
MD5 | 91c0849eb511d0a1231a4d6c92cb47c0 |
|
BLAKE2b-256 | 99a2f4e63240b1e740b1a2c0953b73d2eff40486d82c91d84dd81ca143d16e81 |