Welcome to Python Log Indenter documentation¶
This module helps by allowing you to indent the lines in your log entries to make it easier to read when you are dealing with complex loops and calls (especially with debug level logging)
This subclasses a standard logging.LoggerAdapter
and allows you to control the indent level of your message.
Contents:
This will allow you to turn logs that would normally look like this:
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
Into something like this:
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
Indices and tables¶
Note
Please feel feel free to make bug reports at https://github.com/dstrohl/Python_log_indenter/issues as well as forking the repo and issuing pull requests!