New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep order of arguments in SlogHandler
#611
Comments
SlogHandler
Thanks for making this issue. I am wondering if we should sort the arguments alphabetically, or if we should keep the original order.
A third option would be to make the behavior configurable. Maybe an option in the Logger like EDIT: I'll most likely go with option 3. |
Agreed 💯. Thank you! |
Affects v0.12.74
Expected behavior
SlogHandler
keeps order of arguments when printing, similar toslog.JSONHandler
orslog.TextHandler
Actual behavior
The order of arguments being printed seems to be random.
See the following example with
slog.TextHandler
output compared toSlogHandler
output:First run:
Second run:
The arguments order of
slog.TextHandler
output is kept, the arguments order ofSlogHandler
output varies.The text was updated successfully, but these errors were encountered: