作为上下文管理器处理日志级别的上下文管理器。
项目描述
日志作为上下文管理器。
从Credo的外观得到视觉启发,我总是发现很难在命令行界面与用户交流。因此,这是一个更基于块而非基于行的日志/打印系统,并且带有颜色。
以下将显示一个格式良好的消息
with Message('Hello there') as log:
log('This is a Logging message context manager')
log('it support nesting and will render in a User friendly way')
log('I need to fix multi \nline \nstring')
你可以嵌套这些
with Message('Hello there') as log:
log('This is a Logging message context manager')
log('it support nesting and will render in a User friendly way')
log('I need to fix multi \nline \nstring')
with Warning('Nested it does support') as log1:
log1('like Yoda speach order ')
log1('of words are')
with Critical('Come to the dark side') as log2:
log2('we have cookies')
with OK("Paternity test") as log3:
log3('I am your father')
以获取嵌套消息
项目详情
下载文件
为您的平台下载文件。如果您不确定要选择哪一个,请了解更多关于安装包的信息。
源分布
此版本没有可用的源分布文件。请参阅生成分布存档的教程。
构建分布
withlog-0.0.3-py2.py3-none-any.whl (10.5 kB 查看哈希)
关闭
withlog-0.0.3-py2.py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3800d684ce1dca5a3ee895cbaf3d405238b8611755b037873e28b5d62ba7d8ed |
|
MD5 | 8fa4343feb7b9f83cccf44881051436b |
|
BLAKE2b-256 | 哈希值:d7c819bccf635e7a8e2dbeb9d032120c40c2ef91bcc7a16588d67164fc015f74 |