reuse logfmt-python logic