罗格斯 这是一个结构化的日志库,您可以更轻松地关注每个字段。 pip安装loggus 领域 您可以自由选择要缝合的字段。 默认字段是time , level , msg >>> loggus.info( " test " ) time= " 2021-02-20 21:48:23.832815 " level=info msg=test >>> entry = loggus.withFields({ " type " : " test " }) >>> entry.info( " test " ) time= " 2021-02-20 21:48:23.832815 " level=info msg=test type=test >>> entry = entry.withFields({ " from " : " test " }) >>> entry.info( " test "