Trees | Indices | Help |
|
---|
|
logging.Formatter --+ | multi_line_formatter_t
Custom log formatter to split long message into several lines.
This formatter is used for the default stream handler that outputs its messages to stdout.
Instance Methods | |||
|
|||
|
|||
Inherited from |
Static Methods | |||
|
Method Details |
Constructor. See the Python standard library reference for a documentation of fmt and datefmt. width is the maximum width of the generated text blocks.
|
This method overwrites the original one. The first thing that is done in the original format() method is the creation of the record.message attribute: record.message = record.getMessage() Now this method temporarily replaces the getMessage() method of the record by a version that returns a pregenerated message that spans several lines. Then the original format() method is called which will invoke the 'fake' method.
|
Format a long single line message so that it is easier to read. msgline is a string containing a single message. It can either be a plain message string which is reformatted using the textwrap module or it can be of the form <decl>;<msg> where <decl> is the declaration string and <msg> an arbitrary message. Lines of this form will be separated so that the declaration and the message appear in individual text blocks, where every line of message will start with '>' character. width is the maximum width of any text blocks (without indendation). |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 20 08:51:06 2008 | http://epydoc.sourceforge.net |