Closed vspinu closed 6 months ago
Hm, probably this is a documentation problem, but a formatter
fn runs on ...
as-is, and not separately for each element of ...
. In other words, the default formatter_glue
will take all ...
params, so glue
will fail.
The skip_formatter
approach only works if that's the only (string) object passed, like in your first example.
Not sure who to try to explain this better .. does it make sense?
I see, so ...
are just passed to formatter as is then?
Then I would expect this to work
> log_error(skip_formatter("xxx:"), "{\"x\": [\"a\"]}")
ERROR [2021-05-08 11:24:38] xxx:
skip_formater
should mean that the default, plain formatter (paste?) is run on the entire thing including ...
.
the formater_glue_or_sprintf
suits my needs really well actually. So I think this issue can be treated as a documentation issue indeed.
This works:
This does not work: