twisted.logger._format module documentationtwisted.logger
View Source
Tools for formatting logging events.
| Function | formatUnformattableEvent | Formats an event as a unicode that
describes the event generically and a formatting error. |
| Class | CallMapping | Read-only mapping that turns a ()-suffix in key names into
an invocation of the key rather than a lookup of the key. |
| Function | formatWithCall | Format a string like unicode.format,
but: |
Format a string like unicode.format,
but:
str'd, rather than calling str on the element
directly as normal.
For example:
>>> formatWithCall("{string}, {function()}.",
... dict(string="just a string",
... function=lambda: "a function"))
'just a string, a function.'
| Parameters | formatString | A PEP-3101 format string. (type: unicode) |
| mapping | A dict-like
object to format. | |
| Returns | The string with formatted values interpolated. (type: unicode) | |