driftwood.formatters package¶
Submodules¶
driftwood.formatters.dict module¶
- class driftwood.formatters.dict.DictFormatter(*args, regular_attrs=None, extra_attrs=, []**kwargs)[source]¶
Bases: logging.Formatter
Used for formatting log records into a dict.
Parameters: - regular_attrs (list) – A list of strings specifying built-in python logging args that should be included in each output dict. If not specified, all args will be used. Setting to an empty list will disable regular args.
- extra_attrs (list) – A list of strings specifying additional arguments that may exist on the log record instances and should be included in the messages.
driftwood.formatters.json module¶
- class driftwood.formatters.json.JSONFormatter(*args, regular_attrs=None, extra_attrs=, []**kwargs)[source]¶
Bases: driftwood.formatters.dict.DictFormatter
Formats messages as JSON.
This class is a subclass of driftwood.formatters.DictFormatter, and accepts the same arguments for __init__.
Parameters: - regular_attrs (list) – A list of strings specifying built-in python logging args that should be included in each output dict. If not specified, all args will be used. Setting to an empty list will disable regular args.
- extra_attrs (list) – A list of strings specifying additional arguments that may exist on the log record instances and should be included in the messages.