You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling kgo.BasicLogger .Log() with only one extra argument (len(keyvals) = 1), it panics because len(keyvals) / 2 will be 0 for int variables, the second parameter of strings.Repeat. Since the result is 0, the length of the format variable will be 0, which will cause an out of slice bound access. Therefore that single value should be an EXTRA attribute such as when passing an even number of keyvals.
Context
When calling
kgo.BasicLogger .Log()
with only one extra argument (len(keyvals) = 1
), it panics becauselen(keyvals) / 2
will be 0 for int variables, the second parameter ofstrings.Repeat
. Since the result is 0, the length of the format variable will be 0, which will cause an out of slice bound access. Therefore that single value should be an EXTRA attribute such as when passing an even number ofkeyvals
.Refer to PR #857
Error Reproduction
Output:
But, when passing an even number of
keyvals
greater than 1, it is treated as an EXTRA attribute and we have the following behavior:Output:
Expected Behavior
If
keyvals
length is equal to 1, it should be treated as an EXTRA as follows:The text was updated successfully, but these errors were encountered: