作为上下文管理器处理日志级别的上下文管理器。
withlog的Python项目详细描述
作为上下文管理器登录。
视觉灵感来自Credo 看起来,我总是觉得很难和指挥者沟通 线路接口。所以这是一个记录/打印系统 比线基,还有颜色。
下面将显示一条格式良好的消息:
withMessage('Hello there')aslog: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')
您可以嵌套这些:
withMessage('Hello there')aslog: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')withWarning('Nested it does support')aslog1:log1('like Yoda speach order ')log1('of words are')withCritical('Come to the dark side')aslog2:log2('we have cookies')withOK("Paternity test")aslog3:log3('I am your father')
获取嵌套消息: