sawmill.formatter.base¶
-
class
sawmill.formatter.base.
Formatter
[source]¶ Bases:
object
Format
logs
into data for output.The format of data returned should conform to a contract with supported handlers. In this way a formatter is tightly bound to a Handler and is really only separated out to increase possibility of reuse.
-
format
(logs)[source]¶ Return formatted data representing logs.
The data should be returned as a list, typically one entry per log. Some formatters may choose to combine the passed logs into one formatted datum and should return a list of a single item.
Warning
logs may be shared and should not be altered.
-