I want to be able to ensure that the keys of key-value pairs don't contain spaces.
The first dumb idea that comes to my mind is, panic. But as you know this would be brutal for all the systems that are using zerolog and mistakenly leaving empty space in their key-value pairs
The whole idea of key-value pairs in a structured log is to be able to query that log piece by its key right?
so I propose a default opinionated way of turning a spaced log into a camelCase format. Notice that I also propose to trim out special punctuations like ":, !, *, &, £, $" etc... from the key
other options like train case or snake case also could be considered, however, I do think that camelCase is the best for introspection of logging query systems.
What is the benefit?
Might eventually reduce the mistakes of people creating issues. And prevent wrong usage of structured logging
I want to be able to ensure that the keys of key-value pairs don't contain spaces.
The first dumb idea that comes to my mind is, panic. But as you know this would be brutal for all the systems that are using zerolog and mistakenly leaving empty space in their key-value pairs
The whole idea of key-value pairs in a structured log is to be able to query that log piece by its key right?
so I propose a default opinionated way of turning a spaced log into a camelCase format. Notice that I also propose to trim out special punctuations like ":, !, *, &, £, $" etc... from the key
and I want to enforce it to print internally
other options like train case or snake case also could be considered, however, I do think that camelCase is the best for introspection of logging query systems.
What is the benefit?
Might eventually reduce the mistakes of people creating issues. And prevent wrong usage of structured logging