python loggeradapter类,为日志记录提供自动缩进。
python_log_indenter的Python项目详细描述
为日志记录提供自动缩进的python帮助程序类。
- 文档:http://python-log-indenter.readthedocs.org/en/latest/
- 源代码位于:https://github.com/dstrohl/Python_log_indenter
这将允许您转动通常如下所示的日志:
root DEBUG Loading system root DEBUG Checking for the right record root DEBUG Checking record 1 root DEBUG Checking name root DEBUG Not the right record root DEBUG Checking record 2 root DEBUG checking name root DEBUG Name checks, checking phone number root DEBUG Phone number checks, VALID record! root DEBUG Returning record 2
变成这样:
root DEBUG Loading system root DEBUG Checking for the right record root DEBUG Checking record 1 root DEBUG Checking name root DEBUG Not the right record root DEBUG Checking record 2 root DEBUG checking name root DEBUG Name checks, checking phone number root DEBUG Phone number checks, VALID record! root DEBUG Returning record 2