logfmtxx
logfmtxx copied to clipboard
log without explicit logfmtxx::field{}
Is it possible to omit the explicit logfmtxx::field{}? It makes logging quite wordy.
In the hackernews discussion there was a demonstration of using an initializer_list instead. https://news.ycombinator.com/item?id=39925699#39928104
Hi,
If the demonstration you speak of is https://gcc.godbolt.org/z/dK7Tq6hja, they do so by introducing a type Any. Aren't we loosing some type safety?
I'm not sure. Any is a wrapper around std::any. How would it be misused? Ultimately it just has to be anything that is streamable.