thinlog.filters.assigner module#
Assigner filter – conditionally attach attributes to log records.
- class thinlog.filters.assigner.AssignerFilter(assignments: dict[str, Any], **kwargs: Any)[source]#
Bases:
WhitelistFilterAssign attributes to matching records without blocking any.
Extends
WhitelistFilter– if a record matches the whitelist criteria, the assignments dict is applied to the record as attributes. The filter always returnsTrueso no records are dropped.- Parameters:
assignments – Mapping of attribute names to values that will be set on matching records via
setattr().