| 16 | |
| 17 | |
| 18 | class IndentFormatter(logging.Formatter): |
| 19 | |
| 20 | def format(self, record, *args, **kwargs): |
| 21 | """ |
| 22 | Format a message in the log |
| 23 | |
| 24 | Act like the normal format, but indent anything that is a |
| 25 | newline within the message. |
| 26 | |
| 27 | """ |
| 28 | return logging.Formatter.format( |
| 29 | self, record, *args, **kwargs).replace('\n', '\n' + ' ' * 8) |
| 30 | |
| 31 | |
| 32 | def configure(*args, **kwargs): |