Skip to content
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

Bug | BasicLogger Panics When len(keyvals) is 1 #857

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vicluq
Copy link

@vicluq vicluq commented Nov 6, 2024

refer to issue #856

@twmb
Copy link
Owner

twmb commented Nov 11, 2024

It's not a bug to panic when an API contract is violated. I may merge this, but I'm undecided -- forcing a panic has allowed me to repeatedly catch problems in development when I did have a bug by not passing key/value pairs.

@vicluq
Copy link
Author

vicluq commented Nov 16, 2024

It's not a bug to panic when an API contract is violated. I may merge this, but I'm undecided -- forcing a panic has allowed me to repeatedly catch problems in development when I did have a bug by not passing key/value pairs.

I understand, but that might not seem very user friendly, if you have a feature for EXTRA fields that works with an even number of arguments, it would make sense for it to act this way even with one argument. Another idea could be to improve the error message to make it clear that the problem was that a key/value pair was not passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants